[Console] Fix render exception test#22270
[Console] Fix render exception test#22270ro0NL wants to merge 2 commits intosymfony:3.2from ro0NL:console/render-exception
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