|
|
@@ -131,7 +131,7 @@ class TestController extends ControllerTestAppController
|
|
|
|
|
|
public function returner()
|
|
|
{
|
|
|
- return 'I am from the controller.';
|
|
|
+ return $this->response->withStringBody('I am from the controller.');
|
|
|
}
|
|
|
|
|
|
//@codingStandardsIgnoreStart
|
|
|
@@ -923,11 +923,13 @@ class ControllerTest extends TestCase
|
|
|
'pass' => []
|
|
|
]
|
|
|
]);
|
|
|
- $response = $this->getMockBuilder('Cake\Http\Response')->getMock();
|
|
|
+ $response = new Response();
|
|
|
|
|
|
$Controller = new TestController($url, $response);
|
|
|
$result = $Controller->invokeAction();
|
|
|
- $this->assertEquals('I am from the controller.', $result);
|
|
|
+
|
|
|
+ $this->assertEquals('I am from the controller.', (string)$result);
|
|
|
+ $this->assertEquals('I am from the controller.', (string)$Controller->getResponse());
|
|
|
}
|
|
|
|
|
|
/**
|