public function setMerchant(Merchant $merchant) { if (!Merchant::compare($this->merchant, $merchant)) { $this->save($merchant); } return $this; }
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)); }