|
@@ -6,15 +6,15 @@ discard block |
|
|
block discarded – undo |
|
6
|
6
|
|
|
7
|
7
|
echo "Legacy Loader Test\n\n"; |
|
8
|
8
|
|
|
9
|
|
-include_once __DIR__ . '/../lib/xmlrpc.inc'; |
|
|
9
|
+include_once __DIR__.'/../lib/xmlrpc.inc'; |
|
10
|
10
|
|
|
11
|
|
-include_once __DIR__ . '/parse_args.php'; |
|
|
11
|
+include_once __DIR__.'/parse_args.php'; |
|
12
|
12
|
|
|
13
|
13
|
$args = argParser::getArgs(); |
|
14
|
|
-$baseurl = 'http://' . $args['HTTPSERVER'] . str_replace('/server.php', '/legacy.php', $args['HTTPURI']); |
|
|
14
|
+$baseurl = 'http://'.$args['HTTPSERVER'].str_replace('/server.php', '/legacy.php', $args['HTTPURI']); |
|
15
|
15
|
|
|
16
|
16
|
$randId = uniqid(); |
|
17
|
|
-file_put_contents(sys_get_temp_dir() . '/phpunit_rand_id.txt', $randId); |
|
|
17
|
+file_put_contents(sys_get_temp_dir().'/phpunit_rand_id.txt', $randId); |
|
18
|
18
|
|
|
19
|
19
|
$client = new xmlrpc_client($baseurl); |
|
20
|
20
|
$client->setCookie('PHPUNIT_RANDOM_TEST_ID', $randId); |
|
@@ -22,11 +22,11 @@ discard block |
|
|
block discarded – undo |
|
22
|
22
|
$req = new xmlrpcmsg('system.listMethods', array()); |
|
23
|
23
|
$resp = $client->send($req); |
|
24
|
24
|
if ($resp->faultCode() !== 0) { |
|
25
|
|
- unlink(sys_get_temp_dir() . '/phpunit_rand_id.txt'); |
|
26
|
|
- throw new \Exception("system.listMethods returned fault " . $resp->faultCode()); |
|
|
25
|
+ unlink(sys_get_temp_dir().'/phpunit_rand_id.txt'); |
|
|
26
|
+ throw new \Exception("system.listMethods returned fault ".$resp->faultCode()); |
|
27
|
27
|
} |
|
28
|
28
|
echo ". 1/1 (100%)\n\n"; |
|
29
|
29
|
|
|
30
|
30
|
echo "OK (1 test, 1 assertion)\n"; |
|
31
|
31
|
|
|
32
|
|
-unlink(sys_get_temp_dir() . '/phpunit_rand_id.txt'); |
|
|
32
|
+unlink(sys_get_temp_dir().'/phpunit_rand_id.txt'); |