コード例 #1
0
ファイル: BrandTest.php プロジェクト: alex63530/thelia
 public function testBrandToggleVisibility()
 {
     $brand = $this->getRandomBrand();
     $visibility = $brand->getVisible();
     $event = new BrandToggleVisibilityEvent($brand);
     $event->setDispatcher($this->dispatcher);
     $brandAction = new Brand($this->getContainer());
     $brandAction->toggleVisibility($event);
     $updatedBrand = $event->getBrand();
     $this->assertInstanceOf('Thelia\\Model\\Brand', $updatedBrand);
     $this->assertEquals(!$visibility, $updatedBrand->getVisible());
 }