From 6fe320b4737df13faf954072c0f1f8f4ccd7d182 Mon Sep 17 00:00:00 2001 From: Sven Speckmaier Date: Wed, 21 Jun 2017 11:09:11 +0200 Subject: [PATCH] added redis test --- tests/Redis/RedisTest.php | 40 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 tests/Redis/RedisTest.php diff --git a/tests/Redis/RedisTest.php b/tests/Redis/RedisTest.php new file mode 100644 index 0000000..1e2027d --- /dev/null +++ b/tests/Redis/RedisTest.php @@ -0,0 +1,40 @@ +setConnectionNames($connections); + + if( !$succeeds ) + $this->expectException( CheckFailedException::class ); + + foreach( $connections as $connection ) + $connectionChecker->shouldReceive('check')->with($connection)->once()->andReturn( $succeeds ); + + $checker->check(); + } + + public function dataProvider( ) { + return [ + [ [ 'test' ], true ], + [ [ 'cookies' ], false ], + ]; + } +} \ No newline at end of file