|
@@ -4,15 +4,15 @@ discard block |
|
|
block discarded – undo |
|
4
|
4
|
* A test file designed to test the legacy API class-loading mechanism, ie. not using phpunit/composer's autoload_ |
|
5
|
5
|
*/ |
|
6
|
6
|
|
|
7
|
|
-include_once __DIR__ . '/../lib/xmlrpc.inc'; |
|
|
7
|
+include_once __DIR__.'/../lib/xmlrpc.inc'; |
|
8
|
8
|
|
|
9
|
|
-include_once __DIR__ . '/parse_args.php'; |
|
|
9
|
+include_once __DIR__.'/parse_args.php'; |
|
10
|
10
|
|
|
11
|
11
|
$args = argParser::getArgs(); |
|
12
|
|
-$baseurl = 'http://' . $args['HTTPSERVER'] . str_replace('/server.php', '/legacy.php', $args['HTTPURI']); |
|
|
12
|
+$baseurl = 'http://'.$args['HTTPSERVER'].str_replace('/server.php', '/legacy.php', $args['HTTPURI']); |
|
13
|
13
|
|
|
14
|
14
|
$randId = uniqid(); |
|
15
|
|
-file_put_contents(sys_get_temp_dir() . '/phpunit_rand_id.txt', $randId); |
|
|
15
|
+file_put_contents(sys_get_temp_dir().'/phpunit_rand_id.txt', $randId); |
|
16
|
16
|
|
|
17
|
17
|
$client = new xmlrpc_client($baseurl); |
|
18
|
18
|
$client->setCookie('PHPUNIT_RANDOM_TEST_ID', $randId); |
|
@@ -20,7 +20,7 @@ discard block |
|
|
block discarded – undo |
|
20
|
20
|
$req = new xmlrpcmsg('system.listMethods', array()); |
|
21
|
21
|
$resp = $client->send($req); |
|
22
|
22
|
if ($resp->faultCode() !== 0) { |
|
23
|
|
- throw new \Exception("system.listMethods returned fault " . $resp->faultCode()); |
|
|
23
|
+ throw new \Exception("system.listMethods returned fault ".$resp->faultCode()); |
|
24
|
24
|
} |
|
25
|
25
|
|
|
26
|
|
-unlink(sys_get_temp_dir() . '/phpunit_rand_id.txt'); |
|
|
26
|
+unlink(sys_get_temp_dir().'/phpunit_rand_id.txt'); |