Skip to content

Commit

Permalink
tests(cache): add test testWithPassword
Browse files Browse the repository at this point in the history
  • Loading branch information
doyouhaobaby committed Oct 23, 2020
1 parent 64e0ef3 commit d447693
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/Cache/Redis/PhpRedisTest.php
Expand Up @@ -214,6 +214,18 @@ public function testSelect(): void
$this->assertFalse($phpRedis->get('selecttest'));
}

public function testWithPassword(): void
{
$this->expectException(\RedisException::class);
$this->expectExceptionMessage(
'WRONGPASS invalid username-password pair'
);

$phpRedis = $this->makePhpRedis([
'password' => 'error password',
]);
}

protected function makePhpRedis(array $option = []): PhpRedis
{
$default = [
Expand Down

0 comments on commit d447693

Please sign in to comment.