@@ -15,7 +15,7 @@ class CachedClientTest extends TestCase
15
15
16
16
private CacheInterface |MockObject $ cacheMock ;
17
17
18
- private string $ msid ;
18
+ private string $ id ;
19
19
20
20
private bool $ value ;
21
21
@@ -32,7 +32,7 @@ protected function setUp(): void
32
32
33
33
$ this ->client = new CachedClient ($ this ->clientMock , $ this ->cacheMock );
34
34
35
- $ this ->msid = 'msid ' ;
35
+ $ this ->id = 'msid ' ;
36
36
$ this ->value = true ;
37
37
38
38
$ this ->msids = ['msid1 ' , 'msid2 ' , 'msid3 ' ];
@@ -45,24 +45,24 @@ public function isValidShouldReturnTheCachedResultIfExists()
45
45
$ this ->mockCachedValue ();
46
46
$ this ->expectClientIsValidNotCalled ();
47
47
48
- $ this ->assertEquals ($ this ->value , $ this ->client ->isValid ($ this ->msid ));
48
+ $ this ->assertEquals ($ this ->value , $ this ->client ->isValid ($ this ->id ));
49
49
}
50
50
51
51
#[Test]
52
52
public function isValidShouldReturnTheClientsResponseIfThereIsNoCache ()
53
53
{
54
54
$ this ->mockClientValue ();
55
55
56
- $ this ->assertEquals ($ this ->value , $ this ->client ->isValid ($ this ->msid ));
56
+ $ this ->assertEquals ($ this ->value , $ this ->client ->isValid ($ this ->id ));
57
57
}
58
58
59
59
#[Test]
60
60
public function isValidShouldCacheTheClientsResponse ()
61
61
{
62
62
$ this ->mockClientValue ();
63
- $ this ->expectValueCached ($ this ->msid , $ this ->value );
63
+ $ this ->expectValueCached ($ this ->id , $ this ->value );
64
64
65
- $ this ->client ->isValid ($ this ->msid );
65
+ $ this ->client ->isValid ($ this ->id );
66
66
}
67
67
68
68
#[Test]
@@ -87,7 +87,7 @@ private function mockCachedValue()
87
87
$ this ->cacheMock
88
88
->expects ($ this ->once ())
89
89
->method ('get ' )
90
- ->with ($ this ->msid )
90
+ ->with ($ this ->id )
91
91
->willReturn ($ this ->value );
92
92
}
93
93
@@ -96,7 +96,7 @@ private function mockClientValue()
96
96
$ this ->clientMock
97
97
->expects ($ this ->once ())
98
98
->method ('isValid ' )
99
- ->with ($ this ->msid )
99
+ ->with ($ this ->id )
100
100
->willReturn ($ this ->value );
101
101
}
102
102
0 commit comments