From 9a9c04512e5dcb77c7fe5d850e3f2a0250cc160e Mon Sep 17 00:00:00 2001 From: emkael Date: Wed, 18 Jan 2017 20:07:16 +0100 Subject: * Motor Sport Magazine feed provider --- .../test/Tests/QueryPath/QueryPathTest.php | 56 ++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 lib/querypath/test/Tests/QueryPath/QueryPathTest.php (limited to 'lib/querypath/test/Tests/QueryPath/QueryPathTest.php') diff --git a/lib/querypath/test/Tests/QueryPath/QueryPathTest.php b/lib/querypath/test/Tests/QueryPath/QueryPathTest.php new file mode 100644 index 0000000..71fd225 --- /dev/null +++ b/lib/querypath/test/Tests/QueryPath/QueryPathTest.php @@ -0,0 +1,56 @@ +assertInstanceOf('\QueryPath\DOMQuery', $qp); + + } + + public function testWithHTML() { + $qp = \QueryPath::with(\QueryPath::HTML_STUB); + + $this->assertInstanceOf('\QueryPath\DOMQuery', $qp); + } + public function testWithHTML5() { + $qp = \QueryPath::withHTML5(\QueryPath::HTML5_STUB); + + $this->assertInstanceOf('\QueryPath\DOMQuery', $qp); + } + + public function testWithXML() { + $qp = \QueryPath::with(\QueryPath::XHTML_STUB); + + $this->assertInstanceOf('\QueryPath\DOMQuery', $qp); + } + + public function testEnable() { + \QueryPath::enable('\QueryPath\Tests\DummyExtension'); + + $qp = \QueryPath::with(\QueryPath::XHTML_STUB); + + $this->assertTrue($qp->grrrrrrr()); + + } + +} + +class DummyExtension implements \QueryPath\Extension { + + public function __construct(\QueryPath\Query $qp) { + $this->qp = $qp; + } + + public function grrrrrrr() { + return TRUE; + } + +} -- cgit v1.2.3