File tree Expand file tree Collapse file tree 2 files changed +6
-9
lines changed Expand file tree Collapse file tree 2 files changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -191,8 +191,7 @@ public function deleteMultiple($keys)
191
191
public function has ($ key )
192
192
{
193
193
$ default = $ this ->defaultValue ;
194
- $ prefix = $ this ->getOptionNamePrefix ();
195
- $ value = $ this ->getOption ("{$ prefix }{$ key }" , $ default );
194
+ $ value = $ this ->get ($ key , $ default );
196
195
197
196
return $ value !== $ default ;
198
197
}
Original file line number Diff line number Diff line change @@ -313,18 +313,16 @@ public function testHas()
313
313
$ defaultValue = uniqid ('default ' );
314
314
$ wpdb = $ this ->createWpdb ();
315
315
$ key = uniqid ('key ' );
316
- $ separator = TestSubject::NAMESPACE_SEPARATOR ;
317
- $ transientName = "{$ poolName }{$ separator }{$ key }" ;
318
- $ optionName = "_transient_ $ transientName " ;
319
316
$ notThereKey = uniqid ('not-there ' );
320
- $ notThereTransientName = "{$ poolName }{$ separator }{$ notThereKey }" ;
321
- $ notThereOptionName = "_transient_ $ notThereTransientName " ;
322
- $ subject = $ this ->createInstance ($ wpdb , $ poolName ,$ defaultValue );
317
+ $ subject = $ this ->createInstance ($ wpdb , $ poolName , $ defaultValue );
323
318
}
324
319
325
320
{
321
+ Functions \expect ('get_transient ' )
322
+ ->andReturnValues ([uniqid ('value ' ), false ]);
323
+
326
324
Functions \expect ('get_option ' )
327
- ->andReturnValues ([uniqid ( ' value ' ), $ defaultValue ]);
325
+ ->andReturnValues ([$ defaultValue ]);
328
326
}
329
327
330
328
{
You can’t perform that action at this time.
0 commit comments