tests/AbstractProxy.test.php 1 location
|
@@ 41-49 (lines=9) @@
|
| 38 |
|
*/ |
| 39 |
|
$driverInstance = new CustomMemcachedCacheClass(); |
| 40 |
|
|
| 41 |
|
if (!is_object($driverInstance)) { |
| 42 |
|
echo '[FAIL] $driverInstance returned an invalid variable type:' . gettype($driverInstance) . "\n"; |
| 43 |
|
$status = 1; |
| 44 |
|
}else if(!($driverInstance instanceof MemcachedDriver)){ |
| 45 |
|
echo '[FAIL] $driverInstance returned an invalid class:' . get_class($driverInstance) . "\n"; |
| 46 |
|
$status = 1; |
| 47 |
|
}else{ |
| 48 |
|
echo '[PASS] $driverInstance returned a valid MemcachedDriver (as a class alias) object: ' . get_class($driverInstance) . "\n"; |
| 49 |
|
} |
| 50 |
|
|
| 51 |
|
exit($status); |
tests/Psr6InterfaceImplements.test.php 1 location
|
@@ 23-31 (lines=9) @@
|
| 20 |
|
*/ |
| 21 |
|
$driverInstance = CacheManager::getInstance('Memcached'); |
| 22 |
|
|
| 23 |
|
if (!is_object($driverInstance)) { |
| 24 |
|
echo '[FAIL] CacheManager::getInstance() returned an invalid variable type:' . gettype($driverInstance) . "\n"; |
| 25 |
|
$status = 1; |
| 26 |
|
}else if(!($driverInstance instanceof CacheItemPoolInterface)){ |
| 27 |
|
echo '[FAIL] CacheManager::getInstance() returned an invalid class:' . get_class($driverInstance) . "\n"; |
| 28 |
|
$status = 1; |
| 29 |
|
}else{ |
| 30 |
|
echo '[PASS] CacheManager::getInstance() returned a valid CacheItemPoolInterface object: ' . get_class($driverInstance) . "\n"; |
| 31 |
|
} |
| 32 |
|
|
| 33 |
|
exit($status); |