public function testUpdateBrand() { $brand = $this->getRandomBrand(); $event = new BrandUpdateEvent($brand->getId()); $event->setDispatcher($this->dispatcher); $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($this->getContainer()); $brandAction->update($event); $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()); }