function testAllowRegiserTagAliases() { WactCompiler::writeFile($file = WACT_CACHE_DIR . '/tag_extractor_file.tag.php', $context = 'whatever'); $dictionary = new WactTagDictionary(); $extractor = new WactTagInfoExtractor($dictionary, $file); $extractor->annotation('tag', 'my_tag, my_super_tag'); $extractor->annotation('runat', 'server'); $extractor->beginClass('MyStubExtractorTag', 'CompilerTag'); $tag_info1 = $dictionary->getWactTagInfo('my_tag'); $this->assertEqual($tag_info1->Runat, 'server'); $tag_info2 = $dictionary->getWactTagInfo('my_super_tag'); $this->assertEqual($tag_info2->Runat, 'server'); unlink(WACT_CACHE_DIR . '/tag_extractor_file.tag.php'); }
function testRegisterTagInfoOnceOnly() { $dictionary = new WactTagDictionary(); $tag_info1 = new WactTagInfo('some_tag', 'SomeTagClass'); $tag_info2 = new WactTagInfo('some_tag', 'SomeTagClass'); $dictionary->registerWactTagInfo($tag_info1, $file1 = 'whaever1'); $dictionary->registerWactTagInfo($tag_info2, $file2 = 'whaever2'); $this->assertEqual($dictionary->getWactTagInfo('some_tag'), $tag_info1); }