@@ -12,7 +12,7 @@ class CacheApcStoreTest extends TestCase
1212 public function testGetReturnsNullWhenNotFound ()
1313 {
1414 $ apc = $ this ->getMockBuilder (ApcWrapper::class)->onlyMethods (['get ' ])->getMock ();
15- $ apc ->expects ($ this ->once ())->method ('get ' )->with ($ this -> equalTo ( 'foobar ' ) )->willReturn (null );
15+ $ apc ->expects ($ this ->once ())->method ('get ' )->with ('foobar ' )->willReturn (null );
1616 $ store = new ApcStore ($ apc , 'foo ' );
1717 $ this ->assertNull ($ store ->get ('bar ' ));
1818 }
@@ -53,7 +53,7 @@ public function testSetMethodProperlyCallsAPC()
5353 {
5454 $ apc = $ this ->getMockBuilder (ApcWrapper::class)->onlyMethods (['put ' ])->getMock ();
5555 $ apc ->expects ($ this ->once ())
56- ->method ('put ' )->with ($ this -> equalTo ( 'foo ' ), $ this -> equalTo ( 'bar ' ), $ this -> equalTo ( 60 ) )
56+ ->method ('put ' )->with ('foo ' , 'bar ' , 60 )
5757 ->willReturn (true );
5858 $ store = new ApcStore ($ apc );
5959 $ result = $ store ->put ('foo ' , 'bar ' , 60 );
@@ -91,15 +91,15 @@ public function testSetMultipleMethodProperlyCallsAPC()
9191 public function testIncrementMethodProperlyCallsAPC ()
9292 {
9393 $ apc = $ this ->getMockBuilder (ApcWrapper::class)->onlyMethods (['increment ' ])->getMock ();
94- $ apc ->expects ($ this ->once ())->method ('increment ' )->with ($ this -> equalTo ( 'foo ' ), $ this -> equalTo ( 5 ) );
94+ $ apc ->expects ($ this ->once ())->method ('increment ' )->with ('foo ' , 5 );
9595 $ store = new ApcStore ($ apc );
9696 $ store ->increment ('foo ' , 5 );
9797 }
9898
9999 public function testDecrementMethodProperlyCallsAPC ()
100100 {
101101 $ apc = $ this ->getMockBuilder (ApcWrapper::class)->onlyMethods (['decrement ' ])->getMock ();
102- $ apc ->expects ($ this ->once ())->method ('decrement ' )->with ($ this -> equalTo ( 'foo ' ), $ this -> equalTo ( 5 ) );
102+ $ apc ->expects ($ this ->once ())->method ('decrement ' )->with ('foo ' , 5 );
103103 $ store = new ApcStore ($ apc );
104104 $ store ->decrement ('foo ' , 5 );
105105 }
@@ -108,7 +108,7 @@ public function testStoreItemForeverProperlyCallsAPC()
108108 {
109109 $ apc = $ this ->getMockBuilder (ApcWrapper::class)->onlyMethods (['put ' ])->getMock ();
110110 $ apc ->expects ($ this ->once ())
111- ->method ('put ' )->with ($ this -> equalTo ( 'foo ' ), $ this -> equalTo ( 'bar ' ), $ this -> equalTo ( 0 ) )
111+ ->method ('put ' )->with ('foo ' , 'bar ' , 0 )
112112 ->willReturn (true );
113113 $ store = new ApcStore ($ apc );
114114 $ result = $ store ->forever ('foo ' , 'bar ' );
@@ -118,7 +118,7 @@ public function testStoreItemForeverProperlyCallsAPC()
118118 public function testForgetMethodProperlyCallsAPC ()
119119 {
120120 $ apc = $ this ->getMockBuilder (ApcWrapper::class)->onlyMethods (['delete ' ])->getMock ();
121- $ apc ->expects ($ this ->once ())->method ('delete ' )->with ($ this -> equalTo ( 'foo ' ) )->willReturn (true );
121+ $ apc ->expects ($ this ->once ())->method ('delete ' )->with ('foo ' )->willReturn (true );
122122 $ store = new ApcStore ($ apc );
123123 $ result = $ store ->forget ('foo ' );
124124 $ this ->assertTrue ($ result );
@@ -131,8 +131,8 @@ public function testTouchMethodProperlyCallsAPC(): void
131131
132132 $ apc = $ this ->getMockBuilder (ApcWrapper::class)->onlyMethods (['get ' , 'put ' ])->getMock ();
133133
134- $ apc ->expects ($ this ->once ())->method ('get ' )->with ($ this -> equalTo ( $ key) )->willReturn ('bar ' );
135- $ apc ->expects ($ this ->once ())->method ('put ' )->with ($ this -> equalTo ( $ key), $ this -> equalTo ( 'bar ' ) , $ this -> equalTo ( $ ttl) )->willReturn (true );
134+ $ apc ->expects ($ this ->once ())->method ('get ' )->with ($ key )->willReturn ('bar ' );
135+ $ apc ->expects ($ this ->once ())->method ('put ' )->with ($ key, 'bar ' , $ ttl )->willReturn (true );
136136
137137 $ this ->assertTrue ((new ApcStore ($ apc ))->touch ($ key , $ ttl ));
138138 }
0 commit comments