From faa21471470eeecf3a96acb21a685bcaf12c859a Mon Sep 17 00:00:00 2001 From: Doug Wright Date: Sun, 5 Feb 2023 16:34:49 +0000 Subject: [PATCH] Add testcase for #268 --- tests/VolumePackerTest.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/VolumePackerTest.php b/tests/VolumePackerTest.php index 93410304..16da0bb2 100644 --- a/tests/VolumePackerTest.php +++ b/tests/VolumePackerTest.php @@ -533,4 +533,20 @@ public function testIssue264(): void self::assertCount(5, $packedBox->getItems()); } } + + public function testIssue268(): void + { + foreach ([Rotation::KeepFlat, Rotation::BestFit] as $rotation) { + $this->markTestSkipped(); + $box = new TestBox('Box', 280, 175, 180, 0, 280, 175, 180, 100000); + + $items = new ItemList(); + $items->insert(new TestItem('Item', 140, 35, 30, 0, $rotation), 60); + + $volumePacker = new VolumePacker($box, $items); + $packedBox = $volumePacker->pack(); + + self::assertCount(60, $packedBox->getItems()); + } + } }