PHP 5.6 seems to tolerate an empty string as valid JSON

pull/997/head
El RIDO 2022-10-23 13:21:22 +02:00
parent 44f78ffcdf
commit a66f170c5e
No known key found for this signature in database
GPG Key ID: 0F5C940A6BD81F92
1 changed files with 1 additions and 1 deletions

View File

@ -66,7 +66,7 @@ class YourlsProxyTest extends PHPUnit_Framework_TestCase
public function testServerError()
{
// simulate some other server error that results in a non-JSON reply
file_put_contents($this->_mock_yourls_service, '');
file_put_contents($this->_mock_yourls_service, '500 Internal Server Error');
$yourls = new YourlsProxy($this->_conf, 'https://example.com/?foo#bar');
$this->assertTrue($yourls->isError());