/** * Should display the help message in plain message * @covers \DoctrineModule\Module::getConsoleUsage */ public function testGetConsoleUsage() { $this->cli->expects($this->once())->method('run')->with($this->isInstanceOf('Symfony\\Component\\Console\\Input\\InputInterface'), $this->isInstanceOf('Symfony\\Component\\Console\\Output\\OutputInterface'))->will($this->returnCallback(function (InputInterface $input, OutputInterface $output) { $output->write($input->getFirstArgument() . ' - TEST'); $output->write(' - More output'); })); $module = new Module(); $module->onBootstrap($this->event); $this->assertSame('list - TEST - More output', $module->getConsoleUsage($this->getMock('Zend\\Console\\Adapter\\AdapterInterface'))); }