コード例 #1
0
ファイル: ParserTest.php プロジェクト: sintoris/Known
    public function testParseFromIdOnlyReturnsMicroformatsWithinThatId()
    {
        $input = <<<EOT
<div class="h-entry"><span class="p-name">Not Included</span></div>

<div id="parse-here">
\t<span class="h-card">Included</span>
</div>

<div class="h-entry"><span class="p-name">Not Included</span></div>
EOT;
        $parser = new Parser($input);
        $output = $parser->parseFromId('parse-here');
        $this->assertCount(1, $output['items']);
        $this->assertEquals('Included', $output['items'][0]['properties']['name'][0]);
    }