public function testRunShowModeHelp() { $mode = $this->getMock('\\Migration\\Mode\\Data', [], [], '', false); $mode->expects($this->any())->method('getUsageHelp')->willReturn('mode help'); $this->modeFactory->expects($this->once())->method('create')->with('data')->willReturn($mode); $this->shell->setRawArgs(['data', 'help']); ob_start(); $result = $this->shell->run(); $output = ob_get_contents(); ob_end_clean(); $this->assertSame($this->shell, $result); $this->assertContains('Usage:', $output); $this->assertContains('mode help', $output); }