@@ -16,7 +16,7 @@ public function testGetReturnsNullWhenNotFound()
16
16
$ this ->markTestSkipped ('Memcached module not installed ' );
17
17
}
18
18
19
- $ memcache = $ this ->getMockBuilder (stdClass::class)->addMethods (['get ' , 'getResultCode ' ])->getMock ();
19
+ $ memcache = $ this ->getMockBuilder (stdClass::class)->onlyMethods (['get ' , 'getResultCode ' ])->getMock ();
20
20
$ memcache ->expects ($ this ->once ())->method ('get ' )->with ($ this ->equalTo ('foo:bar ' ))->willReturn (null );
21
21
$ memcache ->expects ($ this ->once ())->method ('getResultCode ' )->willReturn (1 );
22
22
$ store = new MemcachedStore ($ memcache , 'foo ' );
@@ -29,7 +29,7 @@ public function testMemcacheValueIsReturned()
29
29
$ this ->markTestSkipped ('Memcached module not installed ' );
30
30
}
31
31
32
- $ memcache = $ this ->getMockBuilder (stdClass::class)->addMethods (['get ' , 'getResultCode ' ])->getMock ();
32
+ $ memcache = $ this ->getMockBuilder (stdClass::class)->onlyMethods (['get ' , 'getResultCode ' ])->getMock ();
33
33
$ memcache ->expects ($ this ->once ())->method ('get ' )->willReturn ('bar ' );
34
34
$ memcache ->expects ($ this ->once ())->method ('getResultCode ' )->willReturn (0 );
35
35
$ store = new MemcachedStore ($ memcache );
@@ -42,7 +42,7 @@ public function testMemcacheGetMultiValuesAreReturnedWithCorrectKeys()
42
42
$ this ->markTestSkipped ('Memcached module not installed ' );
43
43
}
44
44
45
- $ memcache = $ this ->getMockBuilder (stdClass::class)->addMethods (['getMulti ' , 'getResultCode ' ])->getMock ();
45
+ $ memcache = $ this ->getMockBuilder (stdClass::class)->onlyMethods (['getMulti ' , 'getResultCode ' ])->getMock ();
46
46
$ memcache ->expects ($ this ->once ())->method ('getMulti ' )->with (
47
47
['foo:foo ' , 'foo:bar ' , 'foo:baz ' ]
48
48
)->willReturn ([
0 commit comments