Skip to content

Commit 1bd1978

Browse files
committed
fix to redis to pass boolean into assertion
1 parent 0fbbe62 commit 1bd1978

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Codeception/Module/Redis.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ public function haveInRedis($type, $key, $value)
323323
*/
324324
public function dontSeeInRedis($key, $value = null)
325325
{
326-
$this->assertFalse(
326+
$this->assertFalse((bool)
327327
$this->checkKeyExists($key, $value),
328328
"The key \"$key\" exists" . ($value ? ' and its value matches the one provided' : '')
329329
);
@@ -360,7 +360,7 @@ public function dontSeeInRedis($key, $value = null)
360360
*/
361361
public function dontSeeRedisKeyContains($key, $item, $itemValue = null)
362362
{
363-
$this->assertFalse(
363+
$this->assertFalse((bool)
364364
$this->checkKeyContains($key, $item, $itemValue),
365365
"The key \"$key\" contains " . (
366366
is_null($itemValue)
@@ -396,7 +396,7 @@ public function dontSeeRedisKeyContains($key, $item, $itemValue = null)
396396
*/
397397
public function seeInRedis($key, $value = null)
398398
{
399-
$this->assertTrue(
399+
$this->assertTrue((bool)
400400
$this->checkKeyExists($key, $value),
401401
"Cannot find key \"$key\"" . ($value ? ' with the provided value' : '')
402402
);
@@ -460,7 +460,7 @@ public function sendCommandToRedis($command)
460460
*/
461461
public function seeRedisKeyContains($key, $item, $itemValue = null)
462462
{
463-
$this->assertTrue(
463+
$this->assertTrue((bool)
464464
$this->checkKeyContains($key, $item, $itemValue),
465465
"The key \"$key\" does not contain " . (
466466
is_null($itemValue)

0 commit comments

Comments
 (0)