示例#1
0
 public function testConstruct()
 {
     $this->assertSame(123, $this->package->getWidth());
     $this->assertSame(456, $this->package->getHeight());
     $this->assertSame(789, $this->package->getDepth());
     $this->assertSame(321, $this->package->getWeight());
     $this->assertSame(654, $this->package->getMaxWeight());
 }
示例#2
0
 public function testCreate()
 {
     $package = new Package();
     $package->setWeight(5);
     $package->setWidth(6);
     $package->setLength(7);
     $package->setHeight(8);
     $this->assertEquals(5, $package->getWeight());
     $this->assertEquals(6, $package->getWidth());
     $this->assertEquals(7, $package->getLength());
     $this->assertEquals(8, $package->getHeight());
 }