From e048653b52aad13b5964e1626192ffee2211870b Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Tue, 17 Apr 2012 15:38:03 +0200 Subject: moved functions and classes out of bootstrap There's still more that I'd like to moved out. bootstrap should not contain any logic but only call the appropriate functions for setup the test environment. --- _testing/core/TestRequest.php | 67 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 _testing/core/TestRequest.php (limited to '_testing/core/TestRequest.php') diff --git a/_testing/core/TestRequest.php b/_testing/core/TestRequest.php new file mode 100644 index 000000000..f77c494c3 --- /dev/null +++ b/_testing/core/TestRequest.php @@ -0,0 +1,67 @@ +content = $content; + $this->headers = $headers; + } + + function getContent() { + return $this->content; + } + + function getHeaders() { + return $this->headers; + } + + /** + * Query the response for a JQuery compatible CSS selector + * + * @link https://code.google.com/p/phpquery/wiki/Selectors + * @param string selector + * @returns object a PHPQuery object + */ + function queryHTML($selector){ + if(is_null($pq)) $pq = phpQuery::newDocument($this->content); + return pq($selector); + } +} -- cgit v1.2.3