-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Console] Fix render exception test #22270
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
I confirm this fixes the console test which is broken on 3.2 + master, to be merged in 3.2. Status: reviewed |
Confirming this affects 3.2 as well (2.7 + 2.8 are good) Note im only testing |
@ro0NL In fact this test relies on the deprecated diff --git a/src/Symfony/Component/Console/Tests/ApplicationTest.php b/src/Symfony/Component/Console/Tests/ApplicationTest.php
index 61a9e97..072f0d0 100644
--- a/src/Symfony/Component/Console/Tests/ApplicationTest.php
+++ b/src/Symfony/Component/Console/Tests/ApplicationTest.php
@@ -588,11 +588,8 @@ class ApplicationTest extends TestCase
public function testRenderExceptionEscapesLines()
{
- $application = $this->getMockBuilder('Symfony\Component\Console\Application')->setMethods(array('getTerminalWidth'))->getMock();
+ $application = new Application();
$application->setAutoExit(false);
- $application->expects($this->any())
- ->method('getTerminalWidth')
- ->will($this->returnValue(22));
putenv('COLUMNS=22');
$application->register('foo')->setCode(function () {
throw new \Exception('dont break here <info>!</info>'); |
Thanks. Fixed it.. i guess the 👍 |
Thank you @ro0NL. |
This PR was squashed before being merged into the 3.2 branch (closes #22270). Discussion ---------- [Console] Fix render exception test | Q | A | ------------- | --- | Branch? | 3.2 and up | Bug fix? | yes (regression from #22188 in master) | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #22217 (comment) | License | MIT | Doc PR | symfony/symfony-docs#... <!--highly recommended for new features--> As pointed out by @chalasr tests are mysteriously broken.. not sure what i missed but this is apparently needed now.. cc @fabpot Commits ------- 6b71722 [Console] Fix render exception test
As pointed out by @chalasr tests are mysteriously broken.. not sure what i missed but this is apparently needed now..
cc @fabpot