protected function getConfiguredApplication()
 {
     $application = new Application();
     $loader = new CommandLoader($application, $this->baseDir);
     $loader->load();
     return $application;
 }
Example #2
0
 public function testCommandAddedViaStaticMethod()
 {
     $command = new TestCommand();
     CommandLoader::addCommand($command);
     $application = $this->getConfiguredApplication();
     self::assertInstanceOf('Tests\\Magium\\Cli\\TestCommand', $application->find('test:test'));
 }
Example #3
0
<?php

\Magium\Cli\CommandLoader::addCommandDir('Magium\\Magento\\Cli\\Command', realpath(__DIR__ . '/lib/Magento/Cli/Command'));
\Magium\Cli\Command\ListElements::addDirectory(realpath(__DIR__ . '/lib'), 'Magium');