public function findFile($class)
{
$file = apcu_fetch($this->prefix . $class, $success);
if (!$success) {
apcu_store($this->prefix . $class, $file = $this->decorated->findFile($class) ?: null);
}
return $file;
}
public function testConstructor() { $loader = new ClassLoader(); $loader->addPrefix('Apc\\Namespaced', __DIR__ . DIRECTORY_SEPARATOR . 'Fixtures'); $loader = new ApcClassLoader('test.prefix.', $loader); $this->assertEquals($loader->findFile('\\Apc\\Namespaced\\FooBar'), apcu_fetch('test.prefix.\\Apc\\Namespaced\\FooBar'), '__construct() takes a prefix as its first argument'); }