function setUp() { $xml = TestData::getSearchResult(); $doc = new \DOMDocument(); $doc->loadXML($xml); $elems = $doc->getElementsByTagName('result'); $this->sr = new MLPHP\SearchResult($elems->item(1)); }
function testMatch() { parent::$logger->debug('testMatch'); $searchResults = TestData::getSearchResult(); $doc = new \DOMDocument(); $doc->loadXML($searchResults); $elems = $doc->getElementsByTagName('match'); $match = new MLPHP\Match($elems->item(0)); $this->assertEquals('fn:doc("/bills/111/h1258.xml")/bill/summary', $match->getPath()); $this->assertStringStartsWith('...United', $match->getContent()); }
function setUp() { $xml = TestData::getSearchResult(); $this->sr = new MLPHP\SearchResults($xml); }