Skip to content
Snippets Groups Projects
Commit 80ca0308 authored by Tim van Dijen's avatar Tim van Dijen
Browse files

Raise coverage

parent 43ab8b4a
No related branches found
No related tags found
No related merge requests found
...@@ -7,7 +7,6 @@ namespace SimpleSAML\Test\Store; ...@@ -7,7 +7,6 @@ namespace SimpleSAML\Test\Store;
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;
use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\MockObject\MockObject;
use Predis\Client; use Predis\Client;
use ReflectionClass;
use SimpleSAML\Configuration; use SimpleSAML\Configuration;
use SimpleSAML\Store; use SimpleSAML\Store;
use SimpleSAML\Store\StoreFactory; use SimpleSAML\Store\StoreFactory;
......
...@@ -5,7 +5,6 @@ declare(strict_types=1); ...@@ -5,7 +5,6 @@ declare(strict_types=1);
namespace SimpleSAML\Test\Store; namespace SimpleSAML\Test\Store;
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;
use ReflectionClass;
use SimpleSAML\Configuration; use SimpleSAML\Configuration;
use SimpleSAML\Store; use SimpleSAML\Store;
use SimpleSAML\Store\StoreFactory; use SimpleSAML\Store\StoreFactory;
......
...@@ -4,7 +4,9 @@ declare(strict_types=1); ...@@ -4,7 +4,9 @@ declare(strict_types=1);
namespace SimpleSAML\Test; namespace SimpleSAML\Test;
use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;
use Predis\Client;
use ReflectionClass; use ReflectionClass;
use SimpleSAML\Configuration; use SimpleSAML\Configuration;
use SimpleSAML\Error\CriticalConfigurationError; use SimpleSAML\Error\CriticalConfigurationError;
...@@ -65,6 +67,26 @@ class StoreFactoryTest extends TestCase ...@@ -65,6 +67,26 @@ class StoreFactoryTest extends TestCase
} }
/**
* @test
*/
public function redisStore(): void
{
Configuration::loadFromArray([
'store.type' => 'redis',
'store.redis.prefix' => 'phpunit_',
], '[ARRAY]', 'simplesaml');
$store = StoreFactory::getInstance();
$store->redis = $this->getMockBuilder(Client::class)
->setMethods(['get', 'set', 'setex', 'del', 'disconnect', '__destruct'])
->disableOriginalConstructor()
->getMock();
$this->assertInstanceOf(Store\RedisStore::class, $store);
}
/** /**
* @test * @test
*/ */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment