Browse Source

Fixing more broken tests under phpunit 4

Jose Lorenzo Rodriguez 12 years ago
parent
commit
0ae6c517aa

+ 3 - 3
tests/TestCase/Error/ExceptionRendererTest.php

@@ -643,7 +643,7 @@ class ExceptionRendererTest extends TestCase {
 
 		$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 @@ class ExceptionRendererTest extends TestCase {
 		$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 @@ class ExceptionRendererTest extends TestCase {
 		$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')

+ 1 - 1
tests/TestCase/View/ViewTest.php

@@ -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';