/** * handle() test - default behavior should be to not return the response */ public function testHandle() { $request = new Request(); $request->setMethod('system.listMethods'); $this->_server->setReturnResponse(false); ob_start(); $response = $this->_server->handle($request); $output = ob_get_contents(); ob_end_clean(); $this->_server->setReturnResponse(true); $this->assertFalse(isset($response)); $response = $this->_server->getResponse(); $this->assertTrue($response instanceof Response); $this->assertSame($response->__toString(), $output); $return = $response->getReturnValue(); $this->assertTrue(is_array($return)); $this->assertTrue(in_array('system.multicall', $return)); }