Skip to content

Commit

Permalink
Add testcase for #214
Browse files Browse the repository at this point in the history
  • Loading branch information
dvdoug committed Feb 5, 2023
1 parent 285d093 commit 1655af6
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions tests/VolumePackerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -435,4 +435,23 @@ public function testIssue221(): void

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

public function testIssue214(): void
{
$this->markTestSkipped();
foreach ([Rotation::KeepFlat, Rotation::BestFit] as $rotation) {
$box = new TestBox('A Box', 279, 215, 139, 10, 279, 215, 139, 100000);

$items = new ItemList();
$items->insert(new TestItem('Item A-1', 160, 160, 64, 1, $rotation));
$items->insert(new TestItem('Item A-2', 160, 160, 64, 1, $rotation));
$items->insert(new TestItem('Item B-1', 203, 114, 51, 1, $rotation));
$items->insert(new TestItem('Item B-2', 203, 114, 51, 1, $rotation));

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

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

0 comments on commit 1655af6

Please sign in to comment.