1
0
mirror of https://github.com/guzzle/guzzle.git synced 2025-02-24 10:03:27 +01:00

PHP 7 fixes

This commit is contained in:
Michael Dowling 2016-01-30 16:01:12 -08:00
parent 9627715757
commit a799bb6f0a
2 changed files with 4 additions and 2 deletions

View File

@ -74,6 +74,8 @@ class FileCookieJar extends CookieJar
$json = file_get_contents($filename);
if (false === $json) {
throw new \RuntimeException("Unable to load file {$filename}");
} elseif ($json === '') {
return;
}
$data = \GuzzleHttp\json_decode($json, true);

View File

@ -25,7 +25,7 @@ class FileCookieJarTest extends \PHPUnit_Framework_TestCase
new FileCookieJar($this->file);
}
public function testLoadsFromFileFile()
public function testLoadsFromFile()
{
$jar = new FileCookieJar($this->file);
$this->assertEquals([], $jar->getIterator()->getArrayCopy());
@ -35,7 +35,7 @@ class FileCookieJarTest extends \PHPUnit_Framework_TestCase
/**
* @dataProvider testPersistsToFileFileParameters
*/
public function testPersistsToFileFile($testSaveSessionCookie = false)
public function testPersistsToFile($testSaveSessionCookie = false)
{
$jar = new FileCookieJar($this->file, $testSaveSessionCookie);
$jar->setCookie(new SetCookie([