|
@@ -522,6 +522,23 @@ class ResponseTest extends TestCase
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
|
|
+ * Tests that callable strings are not triggered
|
|
|
|
|
+ *
|
|
|
|
|
+ * @return void
|
|
|
|
|
+ */
|
|
|
|
|
+ public function testSendWithCallableStringBody()
|
|
|
|
|
+ {
|
|
|
|
|
+ $response = $this->getMockBuilder('Cake\Http\Response')
|
|
|
|
|
+ ->setMethods(['_sendHeader'])
|
|
|
|
|
+ ->getMock();
|
|
|
|
|
+ $response->body('phpversion');
|
|
|
|
|
+
|
|
|
|
|
+ ob_start();
|
|
|
|
|
+ $response->send();
|
|
|
|
|
+ $this->assertEquals('phpversion', ob_get_clean());
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
* Tests the disableCache method
|
|
* Tests the disableCache method
|
|
|
*
|
|
*
|
|
|
* @return void
|
|
* @return void
|