예제 #1
0
 public function testRunPassesOutputAndReturnsFailureIfScriptFails()
 {
     $output = new StdOutput(new Color(), $this->createMock(TerminalInterface::class));
     $this->exercise->expects($this->once())->method('getArgs')->will($this->returnValue([[1, 2, 3]]));
     $this->expectOutputRegex('/PHP Parse error:  syntax error, unexpected end of file, expecting \',\' or \';\' /');
     $success = $this->runner->run(new Input('app', ['program' => __DIR__ . '/../res/cli/user-error.php']), $output);
     $this->assertFalse($success);
 }