N98\Magento\ApplicationTest::testComposer PHP Метод

testComposer() публичный Метод

public testComposer ( )
    public function testComposer()
    {
        vfsStream::setup('root');
        vfsStream::create(array('htdocs' => array('app' => array('Mage.php' => '')), 'vendor' => array('acme' => array('magerun-test-module' => array('n98-magerun.yaml' => file_get_contents(__DIR__ . '/_ApplicationTestComposer/n98-magerun.yaml'), 'src' => array('Acme' => array('FooCommand.php' => file_get_contents(__DIR__ . '/_ApplicationTestComposer/FooCommand.php'))))), 'n98' => array('magerun' => array('src' => array('N98' => array('Magento' => array('Command' => array('ConfigurationLoader.php' => '')))))))));
        /** @var \N98\Magento\Application\ConfigurationLoader $configurationLoader */
        $configurationLoader = $this->getMock('\\N98\\Magento\\Application\\ConfigurationLoader', array('getConfigurationLoaderDir'), array(array(), false, new NullOutput()));
        $configurationLoader->expects($this->any())->method('getConfigurationLoaderDir')->will($this->returnValue(vfsStream::url('root/vendor/n98/magerun/src/N98/Magento/Command')));
        /* @var $application Application */
        $application = (require __DIR__ . '/../../../src/bootstrap.php');
        $application->setMagentoRootFolder(vfsStream::url('root/htdocs'));
        $application->setConfigurationLoader($configurationLoader);
        $application->init();
        // Check for module command
        $this->assertInstanceOf('Acme\\FooCommand', $application->find('acme:foo'));
    }