/** * testRequestClientTypes method * * @access public * @return void */ function testRequestClientTypes() { $this->assertFalse($this->RequestHandler->isFlash()); $_SERVER['HTTP_USER_AGENT'] = 'Shockwave Flash'; $this->assertTrue($this->RequestHandler->isFlash()); unset($_SERVER['HTTP_USER_AGENT'], $_SERVER['HTTP_X_REQUESTED_WITH']); $this->assertFalse($this->RequestHandler->isAjax()); $_SERVER['HTTP_X_REQUESTED_WITH'] = 'XMLHttpRequest'; $_SERVER['HTTP_X_PROTOTYPE_VERSION'] = '1.5'; $this->assertTrue($this->RequestHandler->isAjax()); $this->assertEqual($this->RequestHandler->getAjaxVersion(), '1.5'); unset($_SERVER['HTTP_X_REQUESTED_WITH'], $_SERVER['HTTP_X_PROTOTYPE_VERSION']); $this->assertFalse($this->RequestHandler->isAjax()); $this->assertFalse($this->RequestHandler->getAjaxVersion()); }