コード例 #1
0
 public function setMerchant(Merchant $merchant)
 {
     if (!Merchant::compare($this->merchant, $merchant)) {
         $this->save($merchant);
     }
     return $this;
 }
コード例 #2
0
 public function testComparisonDifferentEndpoint()
 {
     $merchantA = new Merchant();
     $merchantA->setApiKey('abc')->setHost('https://a-shop.com')->setPath('/');
     $merchantB = new Merchant();
     $merchantB->setApiKey('abc')->setHost('https://a-shop.com')->setPath('/shop2');
     $this->assertFalse(Merchant::compare($merchantA, $merchantB));
 }