public function testAcceptSingleContentType() { $request = new Request(array('env' => array('HTTP_ACCEPT' => 'application/json,text/xml'))); $this->assertEqual(array('application/json', 'text/xml'), $request->accepts(true)); $this->assertEqual('json', $request->accepts()); $request = new Request(array('env' => array('HTTP_ACCEPT' => 'application/json'))); $this->assertEqual(array('application/json'), $request->accepts(true)); $this->assertEqual('json', $request->accepts()); $request = new Request(array('env' => array('HTTP_ACCEPT' => '*/*'))); $this->assertEqual(array('text/html'), $request->accepts(true)); $this->assertEqual('html', $request->accepts()); }