From 2bb87f39124721e6d1af355101121ad2719607bf Mon Sep 17 00:00:00 2001 From: Doug Wright Date: Sun, 5 Feb 2023 16:54:39 +0000 Subject: [PATCH] Add testcase for #348 --- tests/VolumePackerTest.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/VolumePackerTest.php b/tests/VolumePackerTest.php index e10abbaf..ce01127d 100644 --- a/tests/VolumePackerTest.php +++ b/tests/VolumePackerTest.php @@ -563,4 +563,20 @@ public function testIssue272(): void self::assertCount(6, $packedBox->getItems()); } + + public function testIssue348(): void + { + $this->markTestSkipped(); + $box = new TestBox('18x14x8', 180, 140, 80, 0, 180, 140, 80, 100); + + $items = new ItemList(); + $items->insert(new TestItem('Product1', 45, 20, 35, 17, Rotation::BestFit), 2); + $items->insert(new TestItem('Product2', 175, 70, 70, 26, Rotation::BestFit), 1); + $items->insert(new TestItem('Product3', 155, 70, 70, 20, Rotation::BestFit), 1); + + $volumePacker = new VolumePacker($box, $items); + $packedBox = $volumePacker->pack(); + + self::assertCount(4, $packedBox->getItems()); + } }