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:
parent
9627715757
commit
a799bb6f0a
@ -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);
|
||||
|
@ -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([
|
||||
|
Loading…
x
Reference in New Issue
Block a user