Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 8facb9b

Browse filesBrowse files
committed
properly set request attributes in controller test
1 parent aec10e6 commit 8facb9b
Copy full SHA for 8facb9b

File tree

2 files changed

+3
-2
lines changed
Filter options

2 files changed

+3
-2
lines changed

‎src/Symfony/Bundle/TwigBundle/Controller/ExceptionController.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/TwigBundle/Controller/ExceptionController.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ protected function findTemplate(Request $request, $format, $code, $showException
122122
// default to a generic HTML exception
123123
$request->setRequestFormat('html');
124124

125-
return new TemplateReference('TwigBundle', 'Exception', $this->debug ? 'exception_full' : $name, 'html', 'twig');
125+
return new TemplateReference('TwigBundle', 'Exception', $name, 'html', 'twig');
126126
}
127127

128128
// to be removed when the minimum required version of Twig is >= 2.0

‎src/Symfony/Bundle/TwigBundle/Tests/Controller/ExceptionControllerTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/TwigBundle/Tests/Controller/ExceptionControllerTest.php
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ public function testShowActionCanBeForcedToShowErrorPage()
5151
))
5252
);
5353

54-
$request = Request::create('whatever', 'GET', array('showException' => false));
54+
$request = Request::create('whatever', 'GET');
55+
$request->attributes->set('showException', false);
5556
$exception = FlattenException::create(new \Exception(), 404);
5657
$controller = new ExceptionController($twig, /* "showException" defaults to --> */ true);
5758

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.