public function testEventListener() { $this->mockConfigs(array('is_granted' => false, 'owner_type' => OwnershipType::OWNER_TYPE_ORGANIZATION)); $this->builder->expects($this->never())->method('addEventSubscriber'); $this->extension->buildForm($this->builder, array('ownership_disabled' => false)); }
public function testEventListener() { $this->mockConfigs(array('is_granted' => false, 'owner_type' => OwnershipType::OWNER_TYPE_ORGANIZATION)); $this->builder->expects($this->once())->method('addEventSubscriber')->with($this->isInstanceOf('Oro\\Bundle\\OrganizationBundle\\Form\\EventListener\\OwnerFormSubscriber'))->will($this->returnCallback(array($this, 'eventCallback'))); $this->extension->buildForm($this->builder, array()); }