Beispiel #1
0
 /**
  * Test the output setter
  *
  * @return void
  *
  * @since  1.0
  *
  * @covers Joomla\Console\Command\AbstractCommand::setOutput
  */
 public function testSetOutput()
 {
     // Using mock to make sure we get same object.
     $mockOutput = $this->getMock('Joomla\\Application\\Cli\\Output\\Stdout', array('test'), array(), '', false);
     $mockOutput->expects($this->any())->method('test')->will($this->returnValue('ok'));
     $this->instance->setOutput($mockOutput);
     $output = TestHelper::getValue($this->instance, 'output');
     $this->assertEquals('ok', $output->test());
 }