diff --git a/tests/thinkphp/library/think/responseTest.php b/tests/thinkphp/library/think/responseTest.php index 07545696..ea2ccd56 100644 --- a/tests/thinkphp/library/think/responseTest.php +++ b/tests/thinkphp/library/think/responseTest.php @@ -82,21 +82,12 @@ class responseTest extends \PHPUnit_Framework_TestCase $dataArr["key"] = "value"; $response = Response::create($dataArr, 'json'); - $result = $response->send(); + $result = $response->getContent(); $this->assertEquals('{"key":"value"}', $result); $_GET['callback'] = 'callback'; $response = Response::create($dataArr, 'jsonp'); - $result = $response->options(['var_jsonp_handler' => 'callback'])->send(); + $result = $response->options(['var_jsonp_handler' => 'callback'])->getContent(); $this->assertEquals('callback({"key":"value"});', $result); - - $response = new Response(); - $response->transform(function () { - - return "callbackreturndata"; - }); - $result = $response->send($dataArr); - $this->assertEquals("callbackreturndata", $result); - $_GET[Config::get('var_jsonp_handler')] = ""; } }