public function testRespondToDefaultsToAll() { $request = new Mad_Controller_Request_Mock(); $request->setServer('HTTP_ACCEPT', ''); $request->setUri(''); $responder = new Mad_Controller_Responder($request); $this->assertTrue($responder->html); $this->assertTrue($responder->js); $this->assertTrue($responder->xml); }
public function testFormattedRequestParams() { $xml = '<people type="array"><person><id>1</id></person></people>'; $req = new Mad_Controller_Request_Mock(); $req->setContentType('xml'); $req->setBody($xml); $params = $req->getParameters(); $people = $params['people']; $this->assertEquals(1, $people[0]['id']); }