コード例 #1
0
ファイル: ShippingRateTest.php プロジェクト: saiber/livecart
 public function testGetRatesByService()
 {
     $rate1 = ShippingRate::getNewInstance($this->shippingService, 1.1, 1.2);
     $rate1->save();
     $rate2 = ShippingRate::getNewInstance($this->shippingService, 1.3, 1.4);
     $rate2->save();
     $rates = ShippingRate::getRecordSetByService($this->shippingService);
     $this->assertTrue($rate1 === $rates->get(0));
     $this->assertTrue($rate2 === $rates->get(1));
 }
コード例 #2
0
ファイル: ShippingService.php プロジェクト: saiber/livecart
 /**
  * Get active record set from current service
  *
  * @param boolean $loadReferencedRecords
  * @return ARSet
  */
 public function getRates($loadReferencedRecords = false)
 {
     return ShippingRate::getRecordSetByService($this, $loadReferencedRecords);
 }