@@ -2,12 +2,12 @@ discard block |
||
2 | 2 | /** |
3 | 3 | * NB: do not let your IDE fool you. The correct encoding for this file is NOT UTF8. |
4 | 4 | */ |
5 | -include_once __DIR__ . '/../lib/xmlrpc.inc'; |
|
6 | -include_once __DIR__ . '/../lib/xmlrpcs.inc'; |
|
5 | +include_once __DIR__.'/../lib/xmlrpc.inc'; |
|
6 | +include_once __DIR__.'/../lib/xmlrpcs.inc'; |
|
7 | 7 | |
8 | -include_once __DIR__ . '/parse_args.php'; |
|
8 | +include_once __DIR__.'/parse_args.php'; |
|
9 | 9 | |
10 | -include_once __DIR__ . '/PolyfillTestCase.php'; |
|
10 | +include_once __DIR__.'/PolyfillTestCase.php'; |
|
11 | 11 | |
12 | 12 | use PHPUnit\Runner\BaseTestRunner; |
13 | 13 | |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | |
66 | 66 | public function testUnicodeInMemberName() |
67 | 67 | { |
68 | - $str = "G" . chr(252) . "nter, El" . chr(232) . "ne"; |
|
68 | + $str = "G".chr(252)."nter, El".chr(232)."ne"; |
|
69 | 69 | $v = array($str => new xmlrpcval(1)); |
70 | 70 | $r = new xmlrpcresp(new xmlrpcval($v, 'struct')); |
71 | 71 | $r = $r->serialize(); |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | '<?xml version="1.0"?> |
82 | 82 | <!-- $Id --> |
83 | 83 | <!-- found by G. Giunta, covers what happens when lib receives UTF8 chars in response text and comments --> |
84 | -<!-- ' . chr(224) . chr(252) . chr(232) . 'àüè --> |
|
84 | +<!-- ' . chr(224).chr(252).chr(232).'àüè --> |
|
85 | 85 | <methodResponse> |
86 | 86 | <fault> |
87 | 87 | <value> |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | </member> |
93 | 93 | <member> |
94 | 94 | <name>faultString</name> |
95 | -<value><string>' . chr(224) . chr(252) . chr(232) . 'àüè</string></value> |
|
95 | +<value><string>' . chr(224).chr(252).chr(232).'àüè</string></value> |
|
96 | 96 | </member> |
97 | 97 | </struct> |
98 | 98 | </value> |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | $m = $this->newMsg('dummy'); |
102 | 102 | $r = $m->parseResponse($response); |
103 | 103 | $v = $r->faultString(); |
104 | - $this->assertEquals(chr(224) . chr(252) . chr(232) . chr(224) . chr(252) . chr(232), $v); |
|
104 | + $this->assertEquals(chr(224).chr(252).chr(232).chr(224).chr(252).chr(232), $v); |
|
105 | 105 | } |
106 | 106 | |
107 | 107 | public function testValidNumbers() |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | |
163 | 163 | public function testI8() |
164 | 164 | { |
165 | - if (PHP_INT_SIZE == 4 ) { |
|
165 | + if (PHP_INT_SIZE == 4) { |
|
166 | 166 | $this->markTestSkipped('Can not test i8 as php is compiled in 32 bit mode'); |
167 | 167 | return; |
168 | 168 | } |
@@ -485,11 +485,11 @@ discard block |
||
485 | 485 | |
486 | 486 | public function testUTF8Response() |
487 | 487 | { |
488 | - $string = chr(224) . chr(252) . chr(232); |
|
488 | + $string = chr(224).chr(252).chr(232); |
|
489 | 489 | |
490 | 490 | $s = $this->newMsg('dummy'); |
491 | - $f = "HTTP/1.1 200 OK\r\nContent-type: text/xml; charset=UTF-8\r\n\r\n" . '<?xml version="1.0"?><methodResponse><params><param><value><struct><member><name>userid</name><value>311127</value></member> |
|
492 | -<member><name>dateCreated</name><value><dateTime.iso8601>20011126T09:17:52</dateTime.iso8601></value></member><member><name>content</name><value>' . utf8_encode($string) . '</value></member><member><name>postid</name><value>7414222</value></member></struct></value></param></params></methodResponse> |
|
491 | + $f = "HTTP/1.1 200 OK\r\nContent-type: text/xml; charset=UTF-8\r\n\r\n".'<?xml version="1.0"?><methodResponse><params><param><value><struct><member><name>userid</name><value>311127</value></member> |
|
492 | +<member><name>dateCreated</name><value><dateTime.iso8601>20011126T09:17:52</dateTime.iso8601></value></member><member><name>content</name><value>' . utf8_encode($string).'</value></member><member><name>postid</name><value>7414222</value></member></struct></value></param></params></methodResponse> |
|
493 | 493 | '; |
494 | 494 | $r = $s->parseResponse($f, false, 'phpvals'); |
495 | 495 | $v = $r->value(); |
@@ -497,7 +497,7 @@ discard block |
||
497 | 497 | $this->assertEquals($string, $v); |
498 | 498 | |
499 | 499 | $f = '<?xml version="1.0" encoding="UTF-8"?><methodResponse><params><param><value><struct><member><name>userid</name><value>311127</value></member> |
500 | -<member><name>dateCreated</name><value><dateTime.iso8601>20011126T09:17:52</dateTime.iso8601></value></member><member><name>content</name><value>' . utf8_encode($string) . '</value></member><member><name>postid</name><value>7414222</value></member></struct></value></param></params></methodResponse> |
|
500 | +<member><name>dateCreated</name><value><dateTime.iso8601>20011126T09:17:52</dateTime.iso8601></value></member><member><name>content</name><value>' . utf8_encode($string).'</value></member><member><name>postid</name><value>7414222</value></member></struct></value></param></params></methodResponse> |
|
501 | 501 | '; |
502 | 502 | $r = $s->parseResponse($f, false, 'phpvals'); |
503 | 503 | $v = $r->value(); |
@@ -512,11 +512,11 @@ discard block |
||
512 | 512 | |
513 | 513 | public function testLatin1Response() |
514 | 514 | { |
515 | - $string = chr(224) . chr(252) . chr(232); |
|
515 | + $string = chr(224).chr(252).chr(232); |
|
516 | 516 | |
517 | 517 | $s = $this->newMsg('dummy'); |
518 | - $f = "HTTP/1.1 200 OK\r\nContent-type: text/xml; charset=ISO-8859-1\r\n\r\n" . '<?xml version="1.0"?><methodResponse><params><param><value><struct><member><name>userid</name><value>311127</value></member> |
|
519 | -<member><name>dateCreated</name><value><dateTime.iso8601>20011126T09:17:52</dateTime.iso8601></value></member><member><name>content</name><value>' . $string . '</value></member><member><name>postid</name><value>7414222</value></member></struct></value></param></params></methodResponse> |
|
518 | + $f = "HTTP/1.1 200 OK\r\nContent-type: text/xml; charset=ISO-8859-1\r\n\r\n".'<?xml version="1.0"?><methodResponse><params><param><value><struct><member><name>userid</name><value>311127</value></member> |
|
519 | +<member><name>dateCreated</name><value><dateTime.iso8601>20011126T09:17:52</dateTime.iso8601></value></member><member><name>content</name><value>' . $string.'</value></member><member><name>postid</name><value>7414222</value></member></struct></value></param></params></methodResponse> |
|
520 | 520 | '; |
521 | 521 | $r = $s->parseResponse($f, false, 'phpvals'); |
522 | 522 | $v = $r->value(); |
@@ -524,7 +524,7 @@ discard block |
||
524 | 524 | $this->assertEquals($string, $v); |
525 | 525 | |
526 | 526 | $f = '<?xml version="1.0" encoding="ISO-8859-1"?><methodResponse><params><param><value><struct><member><name>userid</name><value>311127</value></member> |
527 | -<member><name>dateCreated</name><value><dateTime.iso8601>20011126T09:17:52</dateTime.iso8601></value></member><member><name>content</name><value>' . $string . '</value></member><member><name>postid</name><value>7414222</value></member></struct></value></param></params></methodResponse> |
|
527 | +<member><name>dateCreated</name><value><dateTime.iso8601>20011126T09:17:52</dateTime.iso8601></value></member><member><name>content</name><value>' . $string.'</value></member><member><name>postid</name><value>7414222</value></member></struct></value></param></params></methodResponse> |
|
528 | 528 | '; |
529 | 529 | $r = $s->parseResponse($f, false, 'phpvals'); |
530 | 530 | $v = $r->value(); |
@@ -619,7 +619,7 @@ discard block |
||
619 | 619 | $this->assertequals(1, count($v1)); |
620 | 620 | $out = array('me' => array(), 'mytype' => 2, '_php_class' => null); |
621 | 621 | |
622 | - foreach($v1 as $key => $val) |
|
622 | + foreach ($v1 as $key => $val) |
|
623 | 623 | { |
624 | 624 | $this->assertArrayHasKey($key, $out); |
625 | 625 | $expected = $out[$key]; |
@@ -634,7 +634,7 @@ discard block |
||
634 | 634 | $this->assertequals(2, count($v2)); |
635 | 635 | $out = array(array('key' => 0, 'value' => 'object'), array('key' => 1, 'value' => 'object')); |
636 | 636 | $i = 0; |
637 | - foreach($v2 as $key => $val) |
|
637 | + foreach ($v2 as $key => $val) |
|
638 | 638 | { |
639 | 639 | $expected = $out[$i]; |
640 | 640 | $this->assertequals($expected['key'], $key); |
@@ -647,7 +647,7 @@ discard block |
||
647 | 647 | { |
648 | 648 | // nb: make sure that the serialized xml corresponding to this is > 10MB in size |
649 | 649 | $data = array(); |
650 | - for ($i = 0; $i < 500000; $i++ ) { |
|
650 | + for ($i = 0; $i<500000; $i++) { |
|
651 | 651 | $data[] = 'hello world'; |
652 | 652 | } |
653 | 653 |
@@ -21,14 +21,16 @@ |
||
21 | 21 | protected function set_up() |
22 | 22 | { |
23 | 23 | $this->args = argParser::getArgs(); |
24 | - if ($this->args['DEBUG'] == 1) |
|
25 | - ob_start(); |
|
24 | + if ($this->args['DEBUG'] == 1) { |
|
25 | + ob_start(); |
|
26 | + } |
|
26 | 27 | } |
27 | 28 | |
28 | 29 | protected function tear_down() |
29 | 30 | { |
30 | - if ($this->args['DEBUG'] != 1) |
|
31 | - return; |
|
31 | + if ($this->args['DEBUG'] != 1) { |
|
32 | + return; |
|
33 | + } |
|
32 | 34 | $out = ob_get_clean(); |
33 | 35 | $status = $this->getStatus(); |
34 | 36 | if ($status == BaseTestRunner::STATUS_ERROR |
@@ -1,8 +1,8 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -include_once __DIR__ . '/parse_args.php'; |
|
3 | +include_once __DIR__.'/parse_args.php'; |
|
4 | 4 | |
5 | -include_once __DIR__ . '/PolyfillTestCase.php'; |
|
5 | +include_once __DIR__.'/PolyfillTestCase.php'; |
|
6 | 6 | |
7 | 7 | use PHPUnit\Extensions\SeleniumCommon\RemoteCoverage; |
8 | 8 | |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | */ |
29 | 29 | public function _run($result = NULL) |
30 | 30 | { |
31 | - $this->testId = get_class($this) . '__' . $this->getName(); |
|
31 | + $this->testId = get_class($this).'__'.$this->getName(); |
|
32 | 32 | |
33 | 33 | if ($result === NULL) { |
34 | 34 | $result = $this->createResult(); |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | |
57 | 57 | protected function request($file, $method = 'GET', $payload = '', $emptyPageOk = false) |
58 | 58 | { |
59 | - $url = $this->baseUrl . $file; |
|
59 | + $url = $this->baseUrl.$file; |
|
60 | 60 | |
61 | 61 | $ch = curl_init($url); |
62 | 62 | curl_setopt_array($ch, array( |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | { |
75 | 75 | curl_setopt($ch, CURLOPT_COOKIE, 'PHPUNIT_SELENIUM_TEST_ID='.$this->testId); |
76 | 76 | } |
77 | - if ($this->args['DEBUG'] > 0) { |
|
77 | + if ($this->args['DEBUG']>0) { |
|
78 | 78 | curl_setopt($ch, CURLOPT_VERBOSE, 1); |
79 | 79 | } |
80 | 80 | $page = curl_exec($ch); |
@@ -2,20 +2,20 @@ |
||
2 | 2 | |
3 | 3 | use PHPUnit\Runner\Version as PHPUnit_Version; |
4 | 4 | |
5 | -if ( class_exists( 'PHPUnit_Extensions_SeleniumCommon_RemoteCoverage' ) === true |
|
6 | - && class_exists( 'PHPUnit\Extensions\SeleniumCommon\RemoteCoverage' ) === false |
|
5 | +if (class_exists('PHPUnit_Extensions_SeleniumCommon_RemoteCoverage') === true |
|
6 | + && class_exists('PHPUnit\Extensions\SeleniumCommon\RemoteCoverage') === false |
|
7 | 7 | ) { |
8 | - class_alias( 'PHPUnit_Extensions_SeleniumCommon_RemoteCoverage', 'PHPUnit\Extensions\SeleniumCommon\RemoteCoverage' ); |
|
8 | + class_alias('PHPUnit_Extensions_SeleniumCommon_RemoteCoverage', 'PHPUnit\Extensions\SeleniumCommon\RemoteCoverage'); |
|
9 | 9 | } |
10 | 10 | |
11 | -if ( class_exists( 'PHPUnit_Runner_BaseTestRunner' ) === true |
|
12 | - && class_exists( 'PHPUnit\Runner\BaseTestRunner' ) === false |
|
11 | +if (class_exists('PHPUnit_Runner_BaseTestRunner') === true |
|
12 | + && class_exists('PHPUnit\Runner\BaseTestRunner') === false |
|
13 | 13 | ) { |
14 | - class_alias( 'PHPUnit_Runner_BaseTestRunner', 'PHPUnit\Runner\BaseTestRunner' ); |
|
14 | + class_alias('PHPUnit_Runner_BaseTestRunner', 'PHPUnit\Runner\BaseTestRunner'); |
|
15 | 15 | } |
16 | 16 | |
17 | 17 | if (class_exists(PHPUnit_Version::class) === false || version_compare(PHPUnit_Version::id(), '8.0.0', '<')) { |
18 | - include_once __DIR__ . '/PolyfillTestCase7.php'; |
|
18 | + include_once __DIR__.'/PolyfillTestCase7.php'; |
|
19 | 19 | } else { |
20 | - include_once __DIR__ . '/PolyfillTestCase8.php'; |
|
20 | + include_once __DIR__.'/PolyfillTestCase8.php'; |
|
21 | 21 | } |
@@ -1,11 +1,11 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -include_once __DIR__ . '/../lib/xmlrpc.inc'; |
|
4 | -include_once __DIR__ . '/../lib/xmlrpc_wrappers.inc'; |
|
3 | +include_once __DIR__.'/../lib/xmlrpc.inc'; |
|
4 | +include_once __DIR__.'/../lib/xmlrpc_wrappers.inc'; |
|
5 | 5 | |
6 | -include_once __DIR__ . '/parse_args.php'; |
|
6 | +include_once __DIR__.'/parse_args.php'; |
|
7 | 7 | |
8 | -include_once __DIR__ . '/PolyfillTestCase.php'; |
|
8 | +include_once __DIR__.'/PolyfillTestCase.php'; |
|
9 | 9 | |
10 | 10 | use PHPUnit\Extensions\SeleniumCommon\RemoteCoverage; |
11 | 11 | use PHPUnit\Framework\TestResult; |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | // (but only if not called from subclass objects / multitests) |
42 | 42 | if (function_exists('debug_backtrace') && strtolower(get_called_class()) == 'localhosttests') { |
43 | 43 | $trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS); |
44 | - for ($i = 0; $i < count($trace); $i++) { |
|
44 | + for ($i = 0; $i<count($trace); $i++) { |
|
45 | 45 | if (strpos($trace[$i]['function'], 'test') === 0) { |
46 | 46 | self::$failed_tests[$trace[$i]['function']] = true; |
47 | 47 | break; |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | */ |
65 | 65 | public function _run($result = NULL) |
66 | 66 | { |
67 | - $this->testId = get_class($this) . '__' . $this->getName(); |
|
67 | + $this->testId = get_class($this).'__'.$this->getName(); |
|
68 | 68 | |
69 | 69 | if ($result === NULL) { |
70 | 70 | $result = $this->createResult(); |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | $this->args = argParser::getArgs(); |
96 | 96 | |
97 | 97 | $server = explode(':', $this->args['HTTPSERVER']); |
98 | - if (count($server) > 1) { |
|
98 | + if (count($server)>1) { |
|
99 | 99 | $this->client = new xmlrpc_client($this->args['HTTPURI'], $server[0], $server[1]); |
100 | 100 | } else { |
101 | 101 | $this->client = new xmlrpc_client($this->args['HTTPURI'], $this->args['HTTPSERVER']); |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | $this->client->request_compression = $this->request_compression; |
106 | 106 | $this->client->accepted_compression = $this->accepted_compression; |
107 | 107 | |
108 | - $this->coverageScriptUrl = 'http://' . $this->args['HTTPSERVER'] . '/' . str_replace( '/demo/server/server.php', 'tests/phpunit_coverage.php', $this->args['HTTPURI'] ); |
|
108 | + $this->coverageScriptUrl = 'http://'.$this->args['HTTPSERVER'].'/'.str_replace('/demo/server/server.php', 'tests/phpunit_coverage.php', $this->args['HTTPURI']); |
|
109 | 109 | |
110 | 110 | if ($this->args['DEBUG'] == 1) |
111 | 111 | ob_start(); |
@@ -141,9 +141,9 @@ discard block |
||
141 | 141 | return $r; |
142 | 142 | } |
143 | 143 | if (is_array($errorCode)) { |
144 | - $this->assertContains($r->faultCode(), $errorCode, 'Error ' . $r->faultCode() . ' connecting to server: ' . $r->faultString()); |
|
144 | + $this->assertContains($r->faultCode(), $errorCode, 'Error '.$r->faultCode().' connecting to server: '.$r->faultString()); |
|
145 | 145 | } else { |
146 | - $this->assertEquals($errorCode, $r->faultCode(), 'Error ' . $r->faultCode() . ' connecting to server: ' . $r->faultString()); |
|
146 | + $this->assertEquals($errorCode, $r->faultCode(), 'Error '.$r->faultCode().' connecting to server: '.$r->faultString()); |
|
147 | 147 | } |
148 | 148 | if (!$r->faultCode()) { |
149 | 149 | if ($returnResponse) { |
@@ -165,20 +165,20 @@ discard block |
||
165 | 165 | $query = parse_url($this->client->path, PHP_URL_QUERY); |
166 | 166 | parse_str($query, $vars); |
167 | 167 | $query = http_build_query(array_merge($vars, $data)); |
168 | - $this->client->path = parse_url($this->client->path, PHP_URL_PATH) . '?' . $query; |
|
168 | + $this->client->path = parse_url($this->client->path, PHP_URL_PATH).'?'.$query; |
|
169 | 169 | } |
170 | 170 | |
171 | 171 | public function testString() |
172 | 172 | { |
173 | - $sendString = "here are 3 \"entities\": < > & " . |
|
174 | - "and here's a dollar sign: \$pretendvarname and a backslash too: " . chr(92) . |
|
175 | - " - isn't that great? \\\"hackery\\\" at it's best " . |
|
176 | - " also don't want to miss out on \$item[0]. " . |
|
177 | - "The real weird stuff follows: CRLF here" . chr(13) . chr(10) . |
|
178 | - "a simple CR here" . chr(13) . |
|
179 | - "a simple LF here" . chr(10) . |
|
180 | - "and then LFCR" . chr(10) . chr(13) . |
|
181 | - "last but not least weird names: G" . chr(252) . "nter, El" . chr(232) . "ne, and an xml comment closing tag: -->"; |
|
173 | + $sendString = "here are 3 \"entities\": < > & ". |
|
174 | + "and here's a dollar sign: \$pretendvarname and a backslash too: ".chr(92). |
|
175 | + " - isn't that great? \\\"hackery\\\" at it's best ". |
|
176 | + " also don't want to miss out on \$item[0]. ". |
|
177 | + "The real weird stuff follows: CRLF here".chr(13).chr(10). |
|
178 | + "a simple CR here".chr(13). |
|
179 | + "a simple LF here".chr(10). |
|
180 | + "and then LFCR".chr(10).chr(13). |
|
181 | + "last but not least weird names: G".chr(252)."nter, El".chr(232)."ne, and an xml comment closing tag: -->"; |
|
182 | 182 | $m = new xmlrpcmsg('examples.stringecho', array( |
183 | 183 | new xmlrpcval($sendString, 'string'), |
184 | 184 | )); |
@@ -199,7 +199,7 @@ discard block |
||
199 | 199 | public function testLatin1String() |
200 | 200 | { |
201 | 201 | $sendString = |
202 | - "last but not least weird names: G" . chr(252) . "nter, El" . chr(232) . "ne"; |
|
202 | + "last but not least weird names: G".chr(252)."nter, El".chr(232)."ne"; |
|
203 | 203 | $x = '<?xml version="1.0" encoding="ISO-8859-1"?><methodCall><methodName>examples.stringecho</methodName><params><param><value>'. |
204 | 204 | $sendString. |
205 | 205 | '</value></param></params></methodCall>'; |
@@ -303,7 +303,7 @@ discard block |
||
303 | 303 | public function testUtf8Method() |
304 | 304 | { |
305 | 305 | PhpXmlRpc\PhpXmlRpc::$xmlrpc_internalencoding = 'UTF-8'; |
306 | - $m = new xmlrpcmsg("tests.utf8methodname." . 'κόσμε', array( |
|
306 | + $m = new xmlrpcmsg("tests.utf8methodname.".'κόσμε', array( |
|
307 | 307 | new xmlrpcval('hello') |
308 | 308 | )); |
309 | 309 | $v = $this->send($m); |
@@ -325,7 +325,7 @@ discard block |
||
325 | 325 | )); |
326 | 326 | $v = $this->send($m); |
327 | 327 | if ($v) { |
328 | - $this->assertEquals($a + $b, $v->scalarval()); |
|
328 | + $this->assertEquals($a+$b, $v->scalarval()); |
|
329 | 329 | } |
330 | 330 | } |
331 | 331 | |
@@ -337,7 +337,7 @@ discard block |
||
337 | 337 | )); |
338 | 338 | $v = $this->send($m); |
339 | 339 | if ($v) { |
340 | - $this->assertEquals(12 - 23, $v->scalarval()); |
|
340 | + $this->assertEquals(12-23, $v->scalarval()); |
|
341 | 341 | } |
342 | 342 | } |
343 | 343 | |
@@ -371,7 +371,7 @@ discard block |
||
371 | 371 | if ($v) { |
372 | 372 | $sz = $v->arraysize(); |
373 | 373 | $got = ''; |
374 | - for ($i = 0; $i < $sz; $i++) { |
|
374 | + for ($i = 0; $i<$sz; $i++) { |
|
375 | 375 | $b = $v->arraymem($i); |
376 | 376 | if ($b->scalarval()) { |
377 | 377 | $got .= '1'; |
@@ -434,7 +434,7 @@ discard block |
||
434 | 434 | $got = ''; |
435 | 435 | $expected = '37210'; |
436 | 436 | $expect_array = array('ctLeftAngleBrackets', 'ctRightAngleBrackets', 'ctAmpersands', 'ctApostrophes', 'ctQuotes'); |
437 | - foreach($expect_array as $val) { |
|
437 | + foreach ($expect_array as $val) { |
|
438 | 438 | $b = $v->structmem($val); |
439 | 439 | $got .= $b->me['int']; |
440 | 440 | } |
@@ -863,7 +863,7 @@ discard block |
||
863 | 863 | { |
864 | 864 | // make a 'deep client copy' as the original one might have many properties set |
865 | 865 | // also for speed only wrap one method of the whole server |
866 | - $class = wrap_xmlrpc_server($this->client, array('simple_client_copy' => 0, 'method_filter' => '/examples\.getStateName/' )); |
|
866 | + $class = wrap_xmlrpc_server($this->client, array('simple_client_copy' => 0, 'method_filter' => '/examples\.getStateName/')); |
|
867 | 867 | if ($class == '') { |
868 | 868 | $this->fail('Registration of remote server failed'); |
869 | 869 | } else { |
@@ -902,9 +902,9 @@ discard block |
||
902 | 902 | $cookies = array( |
903 | 903 | //'c1' => array(), |
904 | 904 | 'c2' => array('value' => 'c2'), |
905 | - 'c3' => array('value' => 'c3', 'expires' => time() + 60 * 60 * 24 * 30), |
|
906 | - 'c4' => array('value' => 'c4', 'expires' => time() + 60 * 60 * 24 * 30, 'path' => '/'), |
|
907 | - 'c5' => array('value' => 'c5', 'expires' => time() + 60 * 60 * 24 * 30, 'path' => '/', 'domain' => 'localhost'), |
|
905 | + 'c3' => array('value' => 'c3', 'expires' => time()+60 * 60 * 24 * 30), |
|
906 | + 'c4' => array('value' => 'c4', 'expires' => time()+60 * 60 * 24 * 30, 'path' => '/'), |
|
907 | + 'c5' => array('value' => 'c5', 'expires' => time()+60 * 60 * 24 * 30, 'path' => '/', 'domain' => 'localhost'), |
|
908 | 908 | ); |
909 | 909 | $cookiesval = php_xmlrpc_encode($cookies); |
910 | 910 | $m = new xmlrpcmsg('examples.setcookies', array($cookiesval)); |
@@ -952,10 +952,10 @@ discard block |
||
952 | 952 | $m = new xmlrpcmsg('examples.getcookies', array()); |
953 | 953 | foreach ($cookies as $cookie => $val) { |
954 | 954 | $this->client->setCookie($cookie, $val); |
955 | - $cookies[$cookie] = (string)$cookies[$cookie]; |
|
955 | + $cookies[$cookie] = (string) $cookies[$cookie]; |
|
956 | 956 | } |
957 | 957 | $r = $this->client->send($m, $this->timeout, $this->method); |
958 | - $this->assertEquals(0, $r->faultCode(), 'Error ' . $r->faultCode() . ' connecting to server: ' . $r->faultString()); |
|
958 | + $this->assertEquals(0, $r->faultCode(), 'Error '.$r->faultCode().' connecting to server: '.$r->faultString()); |
|
959 | 959 | if (!$r->faultCode()) { |
960 | 960 | $v = $r->value(); |
961 | 961 | $v = php_xmlrpc_decode($v); |
@@ -107,14 +107,16 @@ |
||
107 | 107 | |
108 | 108 | $this->coverageScriptUrl = 'http://' . $this->args['HTTPSERVER'] . '/' . str_replace( '/demo/server/server.php', 'tests/phpunit_coverage.php', $this->args['HTTPURI'] ); |
109 | 109 | |
110 | - if ($this->args['DEBUG'] == 1) |
|
111 | - ob_start(); |
|
110 | + if ($this->args['DEBUG'] == 1) { |
|
111 | + ob_start(); |
|
112 | + } |
|
112 | 113 | } |
113 | 114 | |
114 | 115 | protected function tear_down() |
115 | 116 | { |
116 | - if ($this->args['DEBUG'] != 1) |
|
117 | - return; |
|
117 | + if ($this->args['DEBUG'] != 1) { |
|
118 | + return; |
|
119 | + } |
|
118 | 120 | $out = ob_get_clean(); |
119 | 121 | $status = $this->getStatus(); |
120 | 122 | if ($status == BaseTestRunner::STATUS_ERROR |
@@ -1,10 +1,10 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -include_once __DIR__ . '/../lib/xmlrpc.inc'; |
|
3 | +include_once __DIR__.'/../lib/xmlrpc.inc'; |
|
4 | 4 | |
5 | -include_once __DIR__ . '/parse_args.php'; |
|
5 | +include_once __DIR__.'/parse_args.php'; |
|
6 | 6 | |
7 | -include_once __DIR__ . '/PolyfillTestCase.php'; |
|
7 | +include_once __DIR__.'/PolyfillTestCase.php'; |
|
8 | 8 | |
9 | 9 | use PHPUnit\Runner\BaseTestRunner; |
10 | 10 | |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | // make sure there's no freaking catchall DNS in effect |
60 | 60 | $dnsinfo = dns_get_record($this->client->server); |
61 | 61 | if ($dnsinfo) { |
62 | - $this->markTestSkipped('Seems like there is a catchall DNS in effect: host ' . $this->client->server . ' found'); |
|
62 | + $this->markTestSkipped('Seems like there is a catchall DNS in effect: host '.$this->client->server.' found'); |
|
63 | 63 | } else { |
64 | 64 | $this->assertEquals(5, $r->faultCode()); |
65 | 65 | } |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | |
85 | 85 | // now test a successful connection |
86 | 86 | $server = explode(':', $this->args['HTTPSERVER']); |
87 | - if (count($server) > 1) { |
|
87 | + if (count($server)>1) { |
|
88 | 88 | $this->client->port = $server[1]; |
89 | 89 | } |
90 | 90 | $this->client->server = $server[0]; |
@@ -24,14 +24,16 @@ |
||
24 | 24 | $this->client = new xmlrpc_client('/NOTEXIST.php', $this->args['HTTPSERVER'], 80); |
25 | 25 | $this->client->setDebug($this->args['DEBUG']); |
26 | 26 | |
27 | - if ($this->args['DEBUG'] == 1) |
|
28 | - ob_start(); |
|
27 | + if ($this->args['DEBUG'] == 1) { |
|
28 | + ob_start(); |
|
29 | + } |
|
29 | 30 | } |
30 | 31 | |
31 | 32 | protected function tear_down() |
32 | 33 | { |
33 | - if ($this->args['DEBUG'] != 1) |
|
34 | - return; |
|
34 | + if ($this->args['DEBUG'] != 1) { |
|
35 | + return; |
|
36 | + } |
|
35 | 37 | $out = ob_get_clean(); |
36 | 38 | $status = $this->getStatus(); |
37 | 39 | if ($status == BaseTestRunner::STATUS_ERROR |