eZ\Bundle\EzPublishCoreBundle\Tests\EventListener\ConsoleCommandListenerTest::testValidSiteAccess PHP Method

testValidSiteAccess() public method

public testValidSiteAccess ( )
    public function testValidSiteAccess()
    {
        $this->dispatcher->expects($this->once())->method('dispatch');
        $input = new ArrayInput(array('--siteaccess' => 'site1'), $this->inputDefinition);
        $event = new ConsoleCommandEvent($this->command, $input, $this->testOutput);
        $this->listener->onConsoleCommand($event);
        $this->assertEquals(new SiteAccess('site1', 'cli'), $this->siteAccess);
    }