+
+ /**
+ * Now fake a request array and try the test on it again
+ *
+ * @return void
+ */
+ public function testFakeRequestElement () {
+ // Fake the request here
+ $_REQUEST = array('test_key' => "test_value");
+
+ // Again get an instance
+ $requestInstance = HttpRequest::createHttpRequest();
+
+ // Get the element
+ $testValue = $requestInstance->getRequestElement('test_key');
+
+ // Is it the same?
+ if ($testValue !== "test_value") {
+ // Something went wrong
+ $this->fail(sprintf("[%s] Unexpected value %s (%s) from test key received.",
+ $requestInstance->__toString(),
+ $testValue,
+ gettype($testValue)
+ ));
+ }
+ }