} else {
$this->client = new xmlrpc_client($this->args['URI'], $this->args['LOCALSERVER']);
}
- if ($this->args['DEBUG']) {
- $this->client->setDebug($this->args['DEBUG']);
- }
+
+ $this->client->setDebug($this->args['DEBUG']);
$this->client->request_compression = $this->request_compression;
$this->client->accepted_compression = $this->accepted_compression;
$this->coverageScriptUrl = 'http://' . $this->args['LOCALSERVER'] . '/' . str_replace( '/demo/server/server.php', 'tests/phpunit_coverage.php', $this->args['URI'] );
+
+ if ($this->args['DEBUG'] == 1)
+ ob_start();
+ }
+
+ protected function tearDown()
+ {
+ if ($this->args['DEBUG'] != 1)
+ return;
+ $out = ob_get_clean();
+ $status = $this->getStatus();
+ if ($status == PHPUnit_Runner_BaseTestRunner::STATUS_ERROR
+ || $status == PHPUnit_Runner_BaseTestRunner::STATUS_FAILURE) {
+ echo $out;
+ }
}
protected function send($msg, $errrorcode = 0, $return_response = false)
}
if (is_array($errrorcode)) {
$this->assertContains($r->faultCode(), $errrorcode, 'Error ' . $r->faultCode() . ' connecting to server: ' . $r->faultString());
- }
- else {
+ } else {
$this->assertEquals($r->faultCode(), $errrorcode, 'Error ' . $r->faultCode() . ' connecting to server: ' . $r->faultString());
}
if (!$r->faultCode()) {
public function testLatin1String()
{
$sendstring =
- "last but not least weird names: G" . chr(252) . "nter, El" . chr(232) . "ne, and an xml comment closing tag: -->";
- $f = '<?xml version="1.0" encoding="iso-8859-1"?><methodCall><methodName>examples.stringecho</methodName><params><param><value>'.
+ "last but not least weird names: G" . chr(252) . "nter, El" . chr(232) . "ne";
+ $f = '<?xml version="1.0" encoding="ISO-8859-1"?><methodCall><methodName>examples.stringecho</methodName><params><param><value>'.
$sendstring.
'</value></param></params></methodCall>';
$v = $this->send($f);