/** * Tests the JWeb::redirect method with webkit bug. * * @return void * * @since 11.3 */ public function testRedirectWithWebkitBug() { $url = 'http://j.org/index.php'; // Inject the client information. $this->inspector->setClassProperty('client', (object) array('engine' => JWebClient::WEBKIT)); // Capture the output for this test. ob_start(); $this->inspector->redirect($url); $buffer = ob_get_contents(); ob_end_clean(); $this->assertThat(trim($buffer), $this->equalTo('<html><head>' . '<meta http-equiv="refresh" content="0; url=' . $url . '" />' . '<meta http-equiv="content-type" content="text/html; charset=utf-8" />' . '</head><body></body></html>')); }