Skip to content

Commit

Permalink
Fix CS errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ADmad committed Jun 17, 2015
1 parent 2729a05 commit 1d488cc
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/Controller/ErrorController.php
Expand Up @@ -14,8 +14,8 @@
*/
namespace Cake\Controller;

use Cake\Routing\Router;
use Cake\Event\Event;
use Cake\Routing\Router;

/**
* Error Handling Controller
Expand Down
Expand Up @@ -443,7 +443,7 @@ public function testNoViewClassExtension()
$event = new Event('Controller.startup', $this->Controller);
$this->RequestHandler->initialize([]);
$this->RequestHandler->startup($event);
$this->Controller->eventManager()->on('Controller.beforeRender', function() {
$this->Controller->eventManager()->on('Controller.beforeRender', function () {
return $this->Controller->response;
});
$this->Controller->render();
Expand Down Expand Up @@ -698,7 +698,7 @@ public function testRespondAsWithAttachment()
*/
public function testRenderAsCalledTwice()
{
$this->Controller->eventManager()->on('Controller.beforeRender', function(\Cake\Event\Event $e) {
$this->Controller->eventManager()->on('Controller.beforeRender', function (\Cake\Event\Event $e) {
return $e->subject()->response;
});
$this->Controller->render();
Expand Down
6 changes: 3 additions & 3 deletions tests/TestCase/Controller/ControllerTest.php
Expand Up @@ -849,7 +849,7 @@ public function testViewPathConventions()
]);
$response = $this->getMock('Cake\Network\Response');
$Controller = new \TestApp\Controller\Admin\PostsController($request, $response);
$Controller->eventManager()->on('Controller.beforeRender', function(\Cake\Event\Event $e) {
$Controller->eventManager()->on('Controller.beforeRender', function (Event $e) {
return $e->subject()->response;
});
$Controller->render();
Expand All @@ -860,15 +860,15 @@ public function testViewPathConventions()
]);
$response = $this->getMock('Cake\Network\Response');
$Controller = new \TestApp\Controller\Admin\PostsController($request, $response);
$Controller->eventManager()->on('Controller.beforeRender', function(\Cake\Event\Event $e) {
$Controller->eventManager()->on('Controller.beforeRender', function (Event $e) {
return $e->subject()->response;
});
$Controller->render();
$this->assertEquals('Admin' . DS . 'Super' . DS . 'Posts', $Controller->getView()->viewPath);

$request = new Request('pages/home');
$Controller = new \TestApp\Controller\PagesController($request, $response);
$Controller->eventManager()->on('Controller.beforeRender', function(\Cake\Event\Event $e) {
$Controller->eventManager()->on('Controller.beforeRender', function (Event $e) {
return $e->subject()->response;
});
$Controller->render();
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase/Error/ExceptionRendererTest.php
Expand Up @@ -705,7 +705,7 @@ public function testMissingLayoutPathRenderSafe()

$ExceptionRenderer->controller = $this->getMock('Cake\Controller\Controller', ['render']);
$ExceptionRenderer->controller->helpers = ['Fail', 'Boom'];
$ExceptionRenderer->controller->eventManager()->on('Controller.beforeRender', function($event) {
$ExceptionRenderer->controller->eventManager()->on('Controller.beforeRender', function (Event $event) {
$event->subject()->getView()->layoutPath = 'boom';
});
$ExceptionRenderer->controller->request = new Request;
Expand Down

0 comments on commit 1d488cc

Please sign in to comment.