Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd10fa94

Browse files
committed
Remove validator Redis instance in tests
1 parent58d3353 commitd10fa94

File tree

1 file changed

+5
-13
lines changed

1 file changed

+5
-13
lines changed

‎src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/AbstractRedisSessionHandlerTestCase.php‎

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,6 @@ abstract class AbstractRedisSessionHandlerTestCase extends TestCase
3232
*/
3333
protected$redisClient;
3434

35-
/**
36-
* @var \Redis
37-
*/
38-
protected$validator;
39-
4035
/**
4136
* @return \Redis|\RedisArray|\RedisCluster|\Predis\Client
4237
*/
@@ -52,9 +47,6 @@ protected function setUp()
5247

5348
$host =getenv('REDIS_HOST') ?:'localhost';
5449

55-
$this->validator =new \Redis();
56-
$this->validator->connect($host);
57-
5850
$this->redisClient =$this->createRedisClient($host);
5951
$this->storage =newRedisSessionHandler(
6052
$this->redisClient,
@@ -154,24 +146,24 @@ public function getOptionFixtures(): array
154146
protectedfunctionsetFixture($key,$value,$ttl =null)
155147
{
156148
if (null !==$ttl) {
157-
$this->validator->setex($key,$ttl,$value);
149+
$this->redisClient->setex($key,$ttl,$value);
158150
}else {
159-
$this->validator->set($key,$value);
151+
$this->redisClient->set($key,$value);
160152
}
161153
}
162154

163155
protectedfunctiongetFixture($key)
164156
{
165-
return$this->validator->get($key);
157+
return$this->redisClient->get($key);
166158
}
167159

168160
protectedfunctionhasFixture($key):bool
169161
{
170-
return$this->validator->exists($key);
162+
return$this->redisClient->exists($key);
171163
}
172164

173165
protectedfunctionfixtureTtl($key):int
174166
{
175-
return$this->validator->ttl($key);
167+
return$this->redisClient->ttl($key);
176168
}
177169
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp