public function testXpath() { $html = $this->loadFixture('posts.html'); $document = new Document($html, false); $elements = $document->xpath("//*[contains(concat(' ', normalize-space(@class), ' '), ' post ')]"); $this->assertTrue(is_array($elements)); $this->assertEquals(3, count($elements)); }