Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f2a63c1

Browse files
committed
Use two tests
1 parent b0ca625 commit f2a63c1

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/Symfony/Component/Messenger/Bridge/Redis/Tests/Transport/ConnectionTest.php

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,22 @@ public function testFromDsnWithOptions()
7676
public function testFromDsnWithTls()
7777
{
7878
$redis = $this->createMock(\Redis::class);
79-
$redis->expects($this->exactly(2))
79+
$redis->expects($this->once())
8080
->method('connect')
8181
->with('tls://127.0.0.1', 6379)
8282
->willReturn(null);
8383

8484
Connection::fromDsn('redis://127.0.0.1?tls=1', [], $redis);
85+
}
86+
87+
public function testFromDsnWithTlsOption()
88+
{
89+
$redis = $this->createMock(\Redis::class);
90+
$redis->expects($this->once())
91+
->method('connect')
92+
->with('tls://127.0.0.1', 6379)
93+
->willReturn(null);
94+
8595
Connection::fromDsn('redis://127.0.0.1', ['tls' => true], $redis);
8696
}
8797

0 commit comments

Comments
 (0)