/** * testCustomContent method * * @access public * @return void */ function testCustomContent() { $_SERVER['HTTP_ACCEPT'] = 'text/x-mobile,text/html;q=0.9,text/plain;q=0.8,*/*;q=0.5'; $this->_init(); $this->RequestHandler->setContent('mobile', 'text/x-mobile'); $this->RequestHandler->startup($this->Controller); $this->assertEqual($this->RequestHandler->prefers(), 'mobile'); $this->_init(); $this->RequestHandler->setContent(array('mobile' => 'text/x-mobile')); $this->RequestHandler->startup($this->Controller); $this->assertEqual($this->RequestHandler->prefers(), 'mobile'); }