Commit acda009e authored by Joschi Kuphal's avatar Joschi Kuphal

Added test for HTML fragment language testing (#121)

parent 23aabcb8
......@@ -52,6 +52,18 @@ class ParseLanguageTest extends PHPUnit_Framework_TestCase {
$this->assertEquals('es', $result['items'][0]['properties']['html-lang']);
} # end method testHtmlAndHEntryLang()
* Test HTML fragment with only h-entry lang
public function testFragmentHEntryLangOnly()
$input = '<div class="h-entry" lang="en">This test is in English.</div>';
$parser = new Parser($input);
$result = $parser->parse();
$this->assertEquals('en', $result['items'][0]['properties']['html-lang']);
} # end method testFragmentHEntryLangOnly()
* Test with different <html lang>, h-entry lang, and h-entry without lang,
* which should inherit from the <html lang>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment