public static function createAPCuAliases()
 {
     if (class_exists('Lavoiesl\\APCPolyfill\\APCPolyfill')) {
         APCPolyfill::createAliases();
     } else {
         throw new \RuntimeException(__METHOD__ . ' requires lavoiesl/apc-polyfill');
     }
 }
示例#2
0
 public function testCreateAliases()
 {
     if (function_exists('apc_fetch')) {
         $this->markTestSkipped('APC must not be loaded for tests to be meaningful.');
     } elseif (!function_exists('apcu_fetch')) {
         $this->markTestSkipped('APCu extension is needed.');
     }
     $this->assertFalse(function_exists('apc_fetch'));
     APCPolyfill::createAliases();
     $this->assertTrue(function_exists('apc_fetch'));
 }