Esempio n. 1
0
 public function testCreate()
 {
     $parcel = new Parcel();
     $parcel->setExternalId('prcl_xxxxx');
     $parcel->setLength(8.0);
     $parcel->setWidth(6.0);
     $parcel->setHeight(4.0);
     $parcel->setWeight(32);
     $parcel->setPredefinedPackage('SmallFlatRateBox');
     $this->assertSame('prcl_xxxxx', $parcel->getExternalId());
     $this->assertSame('SmallFlatRateBox', $parcel->getPredefinedPackage());
     $this->assertSame(8.0, $parcel->getLength());
     $this->assertSame(6.0, $parcel->getWidth());
     $this->assertSame(4.0, $parcel->getHeight());
     $this->assertSame(32, $parcel->getWeight());
 }
Esempio n. 2
0
 public function getParcel()
 {
     $parcel = new Parcel();
     $parcel->setExternalId('prcl_xxxx');
     $parcel->setLength(4.1);
     $parcel->setWidth(6.2);
     $parcel->setHeight(8.300000000000001);
     $parcel->setWeight(32);
     return $parcel;
 }