From 16b6ceb156c60e0bf2cc8b59f4a8f7eed8067f5d Mon Sep 17 00:00:00 2001 From: Terry Lin Date: Thu, 24 Sep 2020 22:19:21 +0800 Subject: [PATCH] Add test for Mock driver. --- tests/SimpleCache/Driver/MockTest.php | 31 +++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 tests/SimpleCache/Driver/MockTest.php diff --git a/tests/SimpleCache/Driver/MockTest.php b/tests/SimpleCache/Driver/MockTest.php new file mode 100644 index 0000000..1615f03 --- /dev/null +++ b/tests/SimpleCache/Driver/MockTest.php @@ -0,0 +1,31 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Shieldon\Test\SimpleCache; + +use Psr\SimpleCache\CacheInterface; +use Shieldon\SimpleCache\Driver\Mock; +use Shieldon\Test\SimpleCache\DriverIntegrationTestCase; + +class MockTest extends DriverIntegrationTestCase +{ + public function getCacheDriver() + { + $cache = new Mock(); + + return $cache; + } + + public function testCacheDriver() + { + $driver = $this->getCacheDriver(); + $this->assertTrue($driver instanceof CacheInterface); + } +} \ No newline at end of file