From 9880b1adc78ba2ba908eac56fa8694b620db85f3 Mon Sep 17 00:00:00 2001 From: Jakub-Fajkus Date: Tue, 22 Mar 2022 15:07:56 +0100 Subject: [PATCH] Fix configuration problems --- src/Kdyby/Redis/DI/Config/SessionClientSchema.php | 2 -- tests/KdybyTests/Redis/ExtensionTest.phpt | 5 +++++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Kdyby/Redis/DI/Config/SessionClientSchema.php b/src/Kdyby/Redis/DI/Config/SessionClientSchema.php index 0b5a719..08bf0e0 100644 --- a/src/Kdyby/Redis/DI/Config/SessionClientSchema.php +++ b/src/Kdyby/Redis/DI/Config/SessionClientSchema.php @@ -44,8 +44,6 @@ public function complete($value, \Nette\Schema\Context $context) $value = $this->expandParameters($value); } - $value = $this->getSchema()->complete($value, $context); - return $value; } diff --git a/tests/KdybyTests/Redis/ExtensionTest.phpt b/tests/KdybyTests/Redis/ExtensionTest.phpt index 74573a5..60e8585 100644 --- a/tests/KdybyTests/Redis/ExtensionTest.phpt +++ b/tests/KdybyTests/Redis/ExtensionTest.phpt @@ -139,6 +139,11 @@ class ExtensionTest extends \Tester\TestCase $config->addConfig(__DIR__ . '/files/session.neon'); $dic = $config->createContainer(); Assert::true($dic->getService('redis.client') instanceof Kdyby\Redis\RedisClient); + + /** @var \Kdyby\Redis\RedisClient $client */ + $client = $dic->getService('redis.sessionHandler_client'); + Assert::same(1, $client->getDatabase()); + Assert::true($dic->hasService('redis.sessionHandler')); Assert::type(\Kdyby\Redis\RedisSessionHandler::class, $dic->getService('redis.sessionHandler')); Assert::false($dic->hasService('redis.cacheJournal'));