@@ -41,7 +41,7 @@ public function setUp(): void {
41
41
public function testCacheableResult (): void {
42
42
$ dummy = $ this ->getMockBuilder (Server::class)
43
43
->disableOriginalConstructor ()
44
- ->setMethods (['id ' ])
44
+ ->onlyMethods (['id ' ])
45
45
->getMock ();
46
46
47
47
$ dummy ->expects ($ this ->once ())
@@ -66,7 +66,7 @@ function () use ($dummy) {
66
66
*/
67
67
public function testUncacheableResult (): void {
68
68
$ cacheable = $ this ->getMockBuilder (CacheableDependencyInterface::class)
69
- ->setMethods (['getCacheTags ' , 'getCacheMaxAge ' , 'getCacheContexts ' ])
69
+ ->onlyMethods (['getCacheTags ' , 'getCacheMaxAge ' , 'getCacheContexts ' ])
70
70
->getMock ();
71
71
72
72
$ cacheable ->expects ($ this ->any ())
@@ -83,7 +83,7 @@ public function testUncacheableResult(): void {
83
83
84
84
$ dummy = $ this ->getMockBuilder (Server::class)
85
85
->disableOriginalConstructor ()
86
- ->setMethods (['id ' ])
86
+ ->onlyMethods (['id ' ])
87
87
->getMock ();
88
88
89
89
$ dummy ->expects ($ this ->exactly (2 ))
@@ -111,7 +111,7 @@ public function testUncacheableResult(): void {
111
111
*/
112
112
public function testUncacheableResultAnnotation (): void {
113
113
$ cacheable = $ this ->getMockBuilder (CacheableDependencyInterface::class)
114
- ->setMethods (['getCacheTags ' , 'getCacheMaxAge ' , 'getCacheContexts ' ])
114
+ ->onlyMethods (['getCacheTags ' , 'getCacheMaxAge ' , 'getCacheContexts ' ])
115
115
->getMock ();
116
116
117
117
$ cacheable ->expects ($ this ->any ())
@@ -128,7 +128,7 @@ public function testUncacheableResultAnnotation(): void {
128
128
129
129
$ dummy = $ this ->getMockBuilder (Server::class)
130
130
->disableOriginalConstructor ()
131
- ->setMethods (['id ' ])
131
+ ->onlyMethods (['id ' ])
132
132
->getMock ();
133
133
134
134
$ dummy ->expects ($ this ->exactly (2 ))
@@ -157,7 +157,7 @@ public function testUncacheableResultAnnotation(): void {
157
157
public function testVariables (): void {
158
158
$ dummy = $ this ->getMockBuilder (Server::class)
159
159
->disableOriginalConstructor ()
160
- ->setMethods (['id ' ])
160
+ ->onlyMethods (['id ' ])
161
161
->getMock ();
162
162
163
163
$ dummy ->expects ($ this ->exactly (2 ))
@@ -185,7 +185,7 @@ function () use ($dummy) {
185
185
*/
186
186
public function testContext (): void {
187
187
$ cacheable = $ this ->getMockBuilder (CacheableDependencyInterface::class)
188
- ->setMethods (['getCacheTags ' , 'getCacheMaxAge ' , 'getCacheContexts ' ])
188
+ ->onlyMethods (['getCacheTags ' , 'getCacheMaxAge ' , 'getCacheContexts ' ])
189
189
->getMock ();
190
190
191
191
$ cacheable ->expects ($ this ->any ())
@@ -202,7 +202,7 @@ public function testContext(): void {
202
202
203
203
$ dummy = $ this ->getMockBuilder (Server::class)
204
204
->disableOriginalConstructor ()
205
- ->setMethods (['id ' ])
205
+ ->onlyMethods (['id ' ])
206
206
->getMock ();
207
207
208
208
$ dummy ->expects ($ this ->exactly (2 ))
@@ -261,7 +261,7 @@ public function testContext(): void {
261
261
*/
262
262
public function testTags (): void {
263
263
$ cacheable = $ this ->getMockBuilder (CacheableDependencyInterface::class)
264
- ->setMethods (['getCacheTags ' , 'getCacheMaxAge ' , 'getCacheContexts ' ])
264
+ ->onlyMethods (['getCacheTags ' , 'getCacheMaxAge ' , 'getCacheContexts ' ])
265
265
->getMock ();
266
266
267
267
$ cacheable ->expects ($ this ->any ())
@@ -278,7 +278,7 @@ public function testTags(): void {
278
278
279
279
$ dummy = $ this ->getMockBuilder (Server::class)
280
280
->disableOriginalConstructor ()
281
- ->setMethods (['id ' ])
281
+ ->onlyMethods (['id ' ])
282
282
->getMock ();
283
283
284
284
$ dummy ->expects ($ this ->exactly (2 ))
0 commit comments