Skip to content

Commit

Permalink
Add testcase for #190
Browse files Browse the repository at this point in the history
  • Loading branch information
dvdoug committed Jan 30, 2020
1 parent d7a8c9f commit 1acd7a3
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions tests/VolumePackerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -442,4 +442,26 @@ public function testPassedInItemListKeepsItems(): void

self::assertCount(10, $items);
}


/**
* From issue #190.
*/
public function testOrientationDecisions(): void
{
$this->markTestSkipped(); // until bug is fixed

$box = new TestBox('Box', 250, 250, 200, 0, 250, 250, 200, 10000);

$items = new ItemList();
$item = new TestItem('Item', 200, 50, 60, 200, false);
for ($i = 0; $i < 20; ++$i) {
$items->insert($item);
}

$volumePacker = new VolumePacker($box, $items);
$packedBox = $volumePacker->pack();

self::assertCount(20, $packedBox->getItems());
}
}

0 comments on commit 1acd7a3

Please sign in to comment.