public function testRebuildClassPath() { $dwoo = new Dwoo(DWOO_COMPILE_DIR, DWOO_CACHE_DIR); $loader = new Dwoo_Loader(TEST_DIRECTORY . '/temp/cache'); $dwoo->setLoader($loader); $loader->addDirectory(TEST_DIRECTORY . '/resources/plugins'); file_put_contents(TEST_DIRECTORY . '/resources/plugins/loaderTest2.php', '<?php function Dwoo_Plugin_loaderTest2(Dwoo $dwoo) { return "It works!"; }'); $tpl = new Dwoo_Template_String('{loaderTest2}'); $tpl->forceCompilation(); $this->assertEquals('It works!', $dwoo->get($tpl, array(), $this->compiler)); unlink(TEST_DIRECTORY . '/resources/plugins/loaderTest2.php'); }