Beispiel #1
0
 /**
  * @depends testCreate
  */
 public function testUpdate(CurrencyModel $currency)
 {
     $event = new CurrencyUpdateEvent($currency->getId());
     $event->setCurrencyName('test update')->setCode('AZER')->setRate('2.35')->setLocale('en_US')->setSymbol('ù')->setDispatcher($this->dispatcher);
     $action = new Currency($this->getCurrencyConverter());
     $action->update($event);
     $updatedCurrency = $event->getCurrency();
     $this->assertInstanceOf('Thelia\\Model\\Currency', $updatedCurrency);
     $this->assertEquals('test update', $updatedCurrency->getName());
     $this->assertEquals('AZER', $updatedCurrency->getCode());
     $this->assertEquals('2.35', $updatedCurrency->getRate());
     $this->assertEquals('en_US', $updatedCurrency->getLocale());
     $this->assertEquals('ù', $updatedCurrency->getSymbol());
     return $updatedCurrency;
 }