Example #1
0
 /**
  * Instantiate the controller.
  *
  * @param   Command  $command  The command object.
  */
 public function __construct(Command $command)
 {
     // Setup dependencies.
     $this->app = $command->getApplication();
     $this->input = $command->getInput() ?: new Input\Cli();
     $this->command = $command;
 }
Example #2
0
 /**
  * Test set & get application.
  *
  * @return void
  *
  * @since  1.0
  *
  * @covers Joomla\Console\Command\AbstractCommand::getApplication
  */
 public function testSetAndGetApplication()
 {
     $this->instance->setApplication(new Console());
     $this->assertInstanceOf('Joomla\\Console\\Console', $this->instance->getApplication(), 'Returned not Console object.');
 }