22
33namespace Test ;
44
5+ use ByJG \Cache \Psr16 \BaseCacheEngine ;
56use ByJG \Cache \Psr16 \NoCacheEngine ;
67
78require_once 'BaseCacheTest.php ' ;
@@ -11,8 +12,9 @@ class CachePSR16Test extends BaseCacheTest
1112 /**
1213 * @dataProvider CachePoolProvider
1314 * @param \ByJG\Cache\Psr16\BaseCacheEngine $cacheEngine
15+ * @throws \Psr\SimpleCache\InvalidArgumentException
1416 */
15- public function testGetOneItem (\ ByJG \ Cache \ Psr16 \ BaseCacheEngine $ cacheEngine )
17+ public function testGetOneItem (BaseCacheEngine $ cacheEngine )
1618 {
1719 $ this ->cacheEngine = $ cacheEngine ;
1820
@@ -27,7 +29,7 @@ public function testGetOneItem(\ByJG\Cache\Psr16\BaseCacheEngine $cacheEngine)
2729 $ cacheEngine ->set ('chave ' , 'valor ' );
2830
2931 // Get Object
30- if (!($ cacheEngine instanceof \ ByJG \ Cache \ Psr16 \ NoCacheEngine)) {
32+ if (!($ cacheEngine instanceof NoCacheEngine)) {
3133 $ item2 = $ cacheEngine ->get ('chave ' , 'default ' );
3234 $ this ->assertEquals ('valor ' , $ item2 );
3335 }
@@ -46,8 +48,10 @@ public function testGetOneItem(\ByJG\Cache\Psr16\BaseCacheEngine $cacheEngine)
4648 /**
4749 * @dataProvider CachePoolProvider
4850 * @param \ByJG\Cache\Psr16\BaseCacheEngine $cacheEngine
51+ * @throws \ByJG\Cache\InvalidArgumentException
52+ * @throws \Psr\SimpleCache\InvalidArgumentException
4953 */
50- public function testGetMultipleItems (\ ByJG \ Cache \ Psr16 \ BaseCacheEngine $ cacheEngine )
54+ public function testGetMultipleItems (BaseCacheEngine $ cacheEngine )
5155 {
5256 $ this ->cacheEngine = $ cacheEngine ;
5357
@@ -65,7 +69,7 @@ public function testGetMultipleItems(\ByJG\Cache\Psr16\BaseCacheEngine $cacheEng
6569 $ cacheEngine ->set ('chave2 ' , 'valor2 ' );
6670
6771 // Get Object
68- if (!($ cacheEngine instanceof \ ByJG \ Cache \ Psr16 \ NoCacheEngine)) {
72+ if (!($ cacheEngine instanceof NoCacheEngine)) {
6973 $ item2 = $ cacheEngine ->getMultiple (['chave1 ' , 'chave2 ' ]);
7074 $ this ->assertEquals ('valor1 ' , $ item2 ['chave1 ' ]);
7175 $ this ->assertEquals ('valor2 ' , $ item2 ['chave2 ' ]);
@@ -86,8 +90,9 @@ public function testGetMultipleItems(\ByJG\Cache\Psr16\BaseCacheEngine $cacheEng
8690 /**
8791 * @dataProvider CachePoolProvider
8892 * @param \ByJG\Cache\Psr16\BaseCacheEngine $cacheEngine
93+ * @throws \Psr\SimpleCache\InvalidArgumentException
8994 */
90- public function testTtl (\ ByJG \ Cache \ Psr16 \ BaseCacheEngine $ cacheEngine )
95+ public function testTtl (BaseCacheEngine $ cacheEngine )
9196 {
9297 $ this ->cacheEngine = $ cacheEngine ;
9398
@@ -105,7 +110,7 @@ public function testTtl(\ByJG\Cache\Psr16\BaseCacheEngine $cacheEngine)
105110 $ cacheEngine ->set ('chave2 ' , 'valor2 ' , 2 );
106111
107112 // Get Object
108- if (!($ cacheEngine instanceof \ ByJG \ Cache \ Psr16 \ NoCacheEngine)) {
113+ if (!($ cacheEngine instanceof NoCacheEngine)) {
109114 $ item2 = $ cacheEngine ->get ('chave ' );
110115 $ this ->assertEquals ('valor ' , $ item2 );
111116 $ this ->assertTrue ($ cacheEngine ->has ('chave2 ' ));
@@ -122,8 +127,9 @@ public function testTtl(\ByJG\Cache\Psr16\BaseCacheEngine $cacheEngine)
122127 /**
123128 * @dataProvider CachePoolProvider
124129 * @param \ByJG\Cache\Psr16\BaseCacheEngine $cacheEngine
130+ * @throws \Psr\SimpleCache\InvalidArgumentException
125131 */
126- public function testCacheObject (\ ByJG \ Cache \ Psr16 \ BaseCacheEngine $ cacheEngine )
132+ public function testCacheObject (BaseCacheEngine $ cacheEngine )
127133 {
128134 $ this ->cacheEngine = $ cacheEngine ;
129135
@@ -137,7 +143,7 @@ public function testCacheObject(\ByJG\Cache\Psr16\BaseCacheEngine $cacheEngine)
137143 $ cacheEngine ->set ('chave ' , $ model );
138144
139145 // Get Object
140- if (!($ cacheEngine instanceof \ ByJG \ Cache \ Psr16 \ NoCacheEngine)) {
146+ if (!($ cacheEngine instanceof NoCacheEngine)) {
141147 $ item2 = $ cacheEngine ->get ('chave ' );
142148 $ this ->assertEquals ($ model , $ item2 );
143149 }
@@ -154,8 +160,10 @@ public function testCacheObject(\ByJG\Cache\Psr16\BaseCacheEngine $cacheEngine)
154160 /**
155161 * @dataProvider CachePoolProvider
156162 * @param \ByJG\Cache\Psr16\BaseCacheEngine $cacheEngine
163+ * @throws \ByJG\Cache\InvalidArgumentException
164+ * @throws \Psr\SimpleCache\InvalidArgumentException
157165 */
158- public function testClear (\ ByJG \ Cache \ Psr16 \ BaseCacheEngine $ cacheEngine )
166+ public function testClear (BaseCacheEngine $ cacheEngine )
159167 {
160168 $ this ->cacheEngine = $ cacheEngine ;
161169
0 commit comments