@@ -107,11 +107,12 @@ public function testSave(): void
107107 public function testSavePermanent (): void
108108 {
109109 $ this ->assertTrue ($ this ->handler ->save (self ::$ key1 , 'value ' , 0 ));
110- $ metaData = $ this ->handler ->getMetaData (self ::$ key1 );
111110
112- $ this ->assertNull ($ metaData ['expire ' ]);
113- $ this ->assertLessThanOrEqual (1 , $ metaData ['mtime ' ] - Time::now ()->getTimestamp ());
114- $ this ->assertSame ('value ' , $ metaData ['data ' ]);
111+ $ metadata = $ this ->handler ->getMetaData (self ::$ key1 );
112+ $ this ->assertIsArray ($ metadata );
113+ $ this ->assertNull ($ metadata ['expire ' ]);
114+ $ this ->assertLessThanOrEqual (1 , $ metadata ['mtime ' ] - Time::now ()->getTimestamp ());
115+ $ this ->assertSame ('value ' , $ metadata ['data ' ]);
115116
116117 $ this ->assertTrue ($ this ->handler ->delete (self ::$ key1 ));
117118 }
@@ -131,8 +132,11 @@ public function testDeleteMatchingPrefix(): void
131132 $ this ->handler ->save ('key_ ' . $ i , 'value ' . $ i );
132133 }
133134
135+ $ cacheInfo = $ this ->handler ->getCacheInfo ();
136+ $ this ->assertIsArray ($ cacheInfo );
137+
134138 // check that there are 101 items is cache store
135- $ this ->assertSame ('101 ' , $ this -> handler -> getCacheInfo () ['Keyspace ' ]['db0 ' ]['keys ' ]);
139+ $ this ->assertSame ('101 ' , $ cacheInfo ['Keyspace ' ]['db0 ' ]['keys ' ]);
136140
137141 // Checking that given the prefix "key_1", deleteMatching deletes 13 keys:
138142 // (key_1, key_10, key_11, key_12, key_13, key_14, key_15, key_16, key_17, key_18, key_19, key_100, key_101)
@@ -149,8 +153,11 @@ public function testDeleteMatchingSuffix(): void
149153 $ this ->handler ->save ('key_ ' . $ i , 'value ' . $ i );
150154 }
151155
156+ $ cacheInfo = $ this ->handler ->getCacheInfo ();
157+ $ this ->assertIsArray ($ cacheInfo );
158+
152159 // check that there are 101 items is cache store
153- $ this ->assertSame ('101 ' , $ this -> handler -> getCacheInfo () ['Keyspace ' ]['db0 ' ]['keys ' ]);
160+ $ this ->assertSame ('101 ' , $ cacheInfo ['Keyspace ' ]['db0 ' ]['keys ' ]);
154161
155162 // Checking that given the suffix "1", deleteMatching deletes 11 keys:
156163 // (key_1, key_11, key_21, key_31, key_41, key_51, key_61, key_71, key_81, key_91, key_101)
0 commit comments