Permalink
Browse files

Fixing more broken tests under phpunit 4

  • Loading branch information...
1 parent 880f8c8 commit 0ae6c517aaf82fbbf7fe665642335824f57f9e61 @lorenzo lorenzo committed Mar 10, 2014
Showing with 4 additions and 4 deletions.
  1. +3 −3 tests/TestCase/Error/ExceptionRendererTest.php
  2. +1 −1 tests/TestCase/View/ViewTest.php
@@ -643,7 +643,7 @@ public function testMissingRenderSafe() {
$ExceptionRenderer->controller = $this->getMock('Cake\Controller\Controller', array('render'));
$ExceptionRenderer->controller->helpers = array('Fail', 'Boom');
- $ExceptionRenderer->controller->request = $this->getMock('Cake\Network\Request');
+ $ExceptionRenderer->controller->request = new Request;
$ExceptionRenderer->controller->expects($this->at(0))
->method('render')
->with('missingHelper')
@@ -670,7 +670,7 @@ public function testRenderExceptionInBeforeRender() {
$ExceptionRenderer = new ExceptionRenderer($exception);
$ExceptionRenderer->controller = $this->getMock('Cake\Controller\Controller', array('beforeRender'));
- $ExceptionRenderer->controller->request = $this->getMock('Cake\Network\Request');
+ $ExceptionRenderer->controller->request = new Request;
$ExceptionRenderer->controller->expects($this->any())
->method('beforeRender')
->will($this->throwException($exception));
@@ -698,7 +698,7 @@ public function testMissingSubdirRenderSafe() {
$ExceptionRenderer->controller->layoutPath = 'json';
$ExceptionRenderer->controller->subDir = 'json';
$ExceptionRenderer->controller->viewClass = 'Json';
- $ExceptionRenderer->controller->request = $this->getMock('Cake\Network\Request');
+ $ExceptionRenderer->controller->request = new Request;
$ExceptionRenderer->controller->expects($this->once())
->method('render')
@@ -258,7 +258,7 @@ class ViewTest extends TestCase {
public function setUp() {
parent::setUp();
- $request = $this->getMock('Cake\Network\Request');
+ $request = new Request();
$this->Controller = new Controller($request);
$this->PostsController = new ViewPostsController($request);
$this->PostsController->viewPath = 'Posts';

0 comments on commit 0ae6c51

Please sign in to comment.