public function setMerchant(Merchant $merchant)
 {
     update_option(self::UUID, $merchant->getUuid());
     update_option(self::DESTINATION, $merchant->getDestination());
     update_option(self::HOST, $merchant->getHost());
     update_option(self::OFFER, $merchant->getOffer());
     update_option(self::PASSWORD, $merchant->getPassword());
     update_option(self::PATH, $merchant->getPath());
     update_option(self::IMAGE, $merchant->getImage());
     update_option(self::TERMS, $merchant->getTerms());
     update_option(self::POLICY, $merchant->getPolicy());
     $this->merchant = $merchant;
     return $this;
 }
 public function testBuildingEntity()
 {
     $entity = new Merchant();
     $this->assertInstanceOf('Expressly\\Entity\\Merchant', $entity->setApiKey('dXNlcm5hbWU6cGFzc3dvcmQ='));
     $this->assertInstanceOf('Expressly\\Entity\\Merchant', $entity->setHost('https://a-shop.com'));
     $this->assertInstanceOf('Expressly\\Entity\\Merchant', $entity->setPath('/'));
     $this->assertEquals('https://a-shop.com', $entity->getHost());
     $this->assertEquals('/', $entity->getPath());
     $this->assertEquals('dXNlcm5hbWU6cGFzc3dvcmQ=', $entity->getApiKey());
     $this->assertEquals('username', $entity->getUuid());
     $this->assertEquals('password', $entity->getPassword());
     $this->assertJson(json_encode($entity->toArray()));
     $this->assertJsonStringEqualsJsonString(json_encode($entity->toArray()), json_encode(array('apiKey' => 'dXNlcm5hbWU6cGFzc3dvcmQ=', 'host' => 'https://a-shop.com', 'path' => '/')));
 }