Example #1
0
 public function testConstruct()
 {
     $item = new Item(123, 456, 789, 321);
     $this->assertSame(123, $item->getWidth());
     $this->assertSame(456, $item->getHeight());
     $this->assertSame(789, $item->getDepth());
     $this->assertSame(321, $item->getWeight());
 }
Example #2
0
 /**
  * @param Item $item
  */
 public function addItem(Item $item)
 {
     $this->items[] = $item;
     $this->maxWidth = max($item->getWidth(), $this->maxWidth);
     return $this;
 }