Fix tests.

This commit is contained in:
Raza Mehdi
2020-08-15 01:14:13 +05:00
parent 882d59001f
commit 5edf443141
189 changed files with 1272 additions and 2034 deletions
@@ -24,7 +24,7 @@ class ExceptionsOptionTest extends PredisTestCase
public function testDefaultOptionValue()
{
$option = new ExceptionsOption();
$options = $this->getMock('Predis\Configuration\OptionsInterface');
$options = $this->getMockBuilder('Predis\Configuration\OptionsInterface')->getMock();
$this->assertTrue($option->getDefault($options));
}
@@ -35,7 +35,7 @@ class ExceptionsOptionTest extends PredisTestCase
public function testAcceptsDifferentValuesAndFiltersThemAsBooleans()
{
$option = new ExceptionsOption();
$options = $this->getMock('Predis\Configuration\OptionsInterface');
$options = $this->getMockBuilder('Predis\Configuration\OptionsInterface')->getMock();
$this->assertFalse($option->filter($options, null));
@@ -58,7 +58,7 @@ class ExceptionsOptionTest extends PredisTestCase
public function testReturnsFalesOnValuesNotParsableAsBooleans()
{
$option = new ExceptionsOption();
$options = $this->getMock('Predis\Configuration\OptionsInterface');
$options = $this->getMockBuilder('Predis\Configuration\OptionsInterface')->getMock();
$this->assertFalse($option->filter($options, new \stdClass()));
$this->assertFalse($option->filter($options, 'invalid'));