summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/Api/OpenSearchTest.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/Api/OpenSearchTest.php b/tests/Api/OpenSearchTest.php
index a242319..050713b 100644
--- a/tests/Api/OpenSearchTest.php
+++ b/tests/Api/OpenSearchTest.php
@@ -54,6 +54,23 @@ class Api_OpenSearchTest extends TestBaseApi
);
}
+ public function testOpenSearchSearchUrl()
+ {
+ $xml = $this->getRequest('api/opensearch.php')->send()->getBody();
+ $x = simplexml_load_string($xml);
+ $x->registerXPathNamespace('os', reset($x->getDocNamespaces()));
+
+ $arElements = $x->xpath('//os:Url[@type="text/html"]');
+ $this->assertEquals(
+ 1, count($arElements),
+ 'Url in OpenSearch description is missing'
+ );
+ $this->assertEquals(
+ $GLOBALS['unittestUrl'] . 'search.php/all/{searchTerms}',
+ (string)$arElements[0]['template']
+ );
+ }
+
}
?> \ No newline at end of file