Example #1
0
 public function testUpdateBrand()
 {
     $brand = $this->getRandomBrand();
     $event = new BrandUpdateEvent($brand->getId());
     $event->setVisible(1)->setLocale('en_US')->setTitle('test update brand title')->setChapo('test update brand short description')->setDescription('test update brand description')->setPostscriptum('test update brand postscriptum');
     $brandAction = new Brand();
     $brandAction->update($event, null, $this->getMockEventDispatcher());
     $updatedBrand = $event->getBrand();
     $this->assertInstanceOf('Thelia\\Model\\Brand', $updatedBrand);
     $this->assertEquals(1, $updatedBrand->getVisible());
     $this->assertEquals('test update brand title', $updatedBrand->getTitle());
     $this->assertEquals('test update brand short description', $updatedBrand->getChapo());
     $this->assertEquals('test update brand description', $updatedBrand->getDescription());
     $this->assertEquals('test update brand postscriptum', $updatedBrand->getPostscriptum());
 }