|
|
@ -728,10 +728,10 @@ class ApplicationTest extends TestCase
|
|
|
|
$tester = new ApplicationTester($application);
|
|
|
|
$tester = new ApplicationTester($application);
|
|
|
|
|
|
|
|
|
|
|
|
$tester->run(array('command' => 'foo'), array('decorated' => false, 'capture_stderr_separately' => true));
|
|
|
|
$tester->run(array('command' => 'foo'), array('decorated' => false, 'capture_stderr_separately' => true));
|
|
|
|
$this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception_doublewidth1.txt', $tester->getErrorOutput(true), '->renderException() renders a pretty exceptions with previous exceptions');
|
|
|
|
$this->assertStringMatchesFormatFile(self::$fixturesPath.'/application_renderexception_doublewidth1.txt', $tester->getErrorOutput(true), '->renderException() renders a pretty exceptions with previous exceptions');
|
|
|
|
|
|
|
|
|
|
|
|
$tester->run(array('command' => 'foo'), array('decorated' => true, 'capture_stderr_separately' => true));
|
|
|
|
$tester->run(array('command' => 'foo'), array('decorated' => true, 'capture_stderr_separately' => true));
|
|
|
|
$this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception_doublewidth1decorated.txt', $tester->getErrorOutput(true), '->renderException() renders a pretty exceptions with previous exceptions');
|
|
|
|
$this->assertStringMatchesFormatFile(self::$fixturesPath.'/application_renderexception_doublewidth1decorated.txt', $tester->getErrorOutput(true), '->renderException() renders a pretty exceptions with previous exceptions');
|
|
|
|
|
|
|
|
|
|
|
|
$application = new Application();
|
|
|
|
$application = new Application();
|
|
|
|
$application->setAutoExit(false);
|
|
|
|
$application->setAutoExit(false);
|
|
|
@ -741,7 +741,7 @@ class ApplicationTest extends TestCase
|
|
|
|
});
|
|
|
|
});
|
|
|
|
$tester = new ApplicationTester($application);
|
|
|
|
$tester = new ApplicationTester($application);
|
|
|
|
$tester->run(array('command' => 'foo'), array('decorated' => false, 'capture_stderr_separately' => true));
|
|
|
|
$tester->run(array('command' => 'foo'), array('decorated' => false, 'capture_stderr_separately' => true));
|
|
|
|
$this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception_doublewidth2.txt', $tester->getErrorOutput(true), '->renderException() wraps messages when they are bigger than the terminal');
|
|
|
|
$this->assertStringMatchesFormatFile(self::$fixturesPath.'/application_renderexception_doublewidth2.txt', $tester->getErrorOutput(true), '->renderException() wraps messages when they are bigger than the terminal');
|
|
|
|
putenv('COLUMNS=120');
|
|
|
|
putenv('COLUMNS=120');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -756,7 +756,7 @@ class ApplicationTest extends TestCase
|
|
|
|
$tester = new ApplicationTester($application);
|
|
|
|
$tester = new ApplicationTester($application);
|
|
|
|
|
|
|
|
|
|
|
|
$tester->run(array('command' => 'foo'), array('decorated' => false));
|
|
|
|
$tester->run(array('command' => 'foo'), array('decorated' => false));
|
|
|
|
$this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception_escapeslines.txt', $tester->getDisplay(true), '->renderException() escapes lines containing formatting');
|
|
|
|
$this->assertStringMatchesFormatFile(self::$fixturesPath.'/application_renderexception_escapeslines.txt', $tester->getDisplay(true), '->renderException() escapes lines containing formatting');
|
|
|
|
putenv('COLUMNS=120');
|
|
|
|
putenv('COLUMNS=120');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -773,7 +773,7 @@ class ApplicationTest extends TestCase
|
|
|
|
$tester = new ApplicationTester($application);
|
|
|
|
$tester = new ApplicationTester($application);
|
|
|
|
|
|
|
|
|
|
|
|
$tester->run(array('command' => 'foo'), array('decorated' => false));
|
|
|
|
$tester->run(array('command' => 'foo'), array('decorated' => false));
|
|
|
|
$this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception_linebreaks.txt', $tester->getDisplay(true), '->renderException() keep multiple line breaks');
|
|
|
|
$this->assertStringMatchesFormatFile(self::$fixturesPath.'/application_renderexception_linebreaks.txt', $tester->getDisplay(true), '->renderException() keep multiple line breaks');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public function testRun()
|
|
|
|
public function testRun()
|
|
|
|