示例#1
0
文件: Package.php 项目: Lc5/FirstFit
 /**
  * @param PackageDetails $packageDetails
  */
 public function __construct(PackageDetails $packageDetails)
 {
     $this->width = $packageDetails->getWidth();
     $this->height = $packageDetails->getHeight();
     $this->depth = $packageDetails->getDepth();
     $this->weight = $packageDetails->getWeight();
     $this->maxWeight = $packageDetails->getMaxWeight();
 }
示例#2
0
 public function testConstruct()
 {
     $packageDetails = new PackageDetails(123, 456, 789, 321, 654);
     $this->assertSame(123, $packageDetails->getWidth());
     $this->assertSame(456, $packageDetails->getHeight());
     $this->assertSame(789, $packageDetails->getDepth());
     $this->assertSame(321, $packageDetails->getWeight());
     $this->assertSame(654, $packageDetails->getMaxWeight());
 }