Esempio n. 1
0
 /**
  * @group ZF-4670
  */
 public function testPluginLoaderShouldAppendIncludeCacheWhenClassIsFound()
 {
     $cacheFile = $this->_includeCache;
     PluginLoader::setIncludeFileCache($cacheFile);
     $loader = new PluginLoader(array());
     $loader->addPrefixPath('Zend_View_Helper', $this->libPath . '/Zend/View/Helper');
     $loader->addPrefixPath('ZfTest', dirname(__FILE__) . '/_files/ZfTest');
     try {
         $className = $loader->load('CacheTest');
     } catch (Exception $e) {
         $paths = $loader->getPaths();
         $this->fail(sprintf("Failed loading helper; paths: %s", var_export($paths, 1)));
     }
     $this->assertTrue(file_exists($cacheFile));
     $cache = file_get_contents($cacheFile);
     $this->assertContains('CacheTest.php', $cache);
 }