function testLoad() { $rnd = mt_rand(); $content1 = <<<EOD <?php /** * @tag foo_{$rnd} */ class Foo{$rnd}Tag extends lmbMacroTag{} EOD; $content2 = <<<EOD <?php /** * @tag bar_{$rnd} */ class Bar{$rnd}Tag extends lmbMacroTag{} EOD; file_put_contents($file1 = LIMB_VAR_DIR . '/tpl/tags/foo_' . $rnd . '.tag.php', $content1); file_put_contents($file2 = LIMB_VAR_DIR . '/tpl/tags/subfolder/bar_' . $rnd . '.tag.php', $content2); $tag_info1 = new lmbMacroTagInfo("foo_{$rnd}", "Foo{$rnd}Tag"); $tag_info1->setFile($file1); $tag_info2 = new lmbMacroTagInfo("bar_{$rnd}", "Bar{$rnd}Tag"); $tag_info2->setFile($file2); $config = $this->_createMacroConfig(); $config->tags_scan_dirs = array(LIMB_VAR_DIR . '/tpl/tags/'); $dictionary = new lmbMacroTagDictionary(); $dictionary->load($config); $this->assertEqual($dictionary->findTagInfo("foo_{$rnd}")->getTag(), $tag_info1->getTag()); $this->assertEqual($dictionary->findTagInfo("bar_{$rnd}")->getTag(), $tag_info2->getTag()); }