Skip to content

Commit

Permalink
Add testcase for #264
Browse files Browse the repository at this point in the history
  • Loading branch information
dvdoug committed Feb 5, 2023
1 parent 1b907a1 commit b919962
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions tests/VolumePackerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -513,4 +513,24 @@ public function testIssue240(): void

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

public function testIssue264(): void
{
foreach ([Rotation::KeepFlat, Rotation::BestFit] as $rotation) {
$this->markTestSkipped();
$box = new TestBox('Small', 160, 130, 70, 0, 160, 130, 70, 100000);

$items = new ItemList();
$items->insert(new TestItem('Item 1', 105, 70, 14, 0, $rotation), 1);
$items->insert(new TestItem('Item 2', 152, 101, 5, 0, $rotation), 1);
$items->insert(new TestItem('Item 3', 80, 70, 50, 0, $rotation), 1);
$items->insert(new TestItem('Item 4', 97, 71, 28, 0, $rotation), 1);
$items->insert(new TestItem('Item 5', 95, 70, 28, 0, $rotation), 1);

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

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

0 comments on commit b919962

Please sign in to comment.