protected function getConfiguredApplication() { $application = new Application(); $loader = new CommandLoader($application, $this->baseDir); $loader->load(); return $application; }
public function testCommandAddedViaStaticMethod() { $command = new TestCommand(); CommandLoader::addCommand($command); $application = $this->getConfiguredApplication(); self::assertInstanceOf('Tests\\Magium\\Cli\\TestCommand', $application->find('test:test')); }
<?php \Magium\Cli\CommandLoader::addCommandDir('Magium\\Magento\\Cli\\Command', realpath(__DIR__ . '/lib/Magento/Cli/Command')); \Magium\Cli\Command\ListElements::addDirectory(realpath(__DIR__ . '/lib'), 'Magium');