@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -include_once __DIR__ . '/WebTestCase.php'; |
|
3 | +include_once __DIR__.'/WebTestCase.php'; |
|
4 | 4 | |
5 | 5 | /** |
6 | 6 | * Tests for php files in the 'extras' directory. |
@@ -12,8 +12,8 @@ discard block |
||
12 | 12 | $this->args = argParser::getArgs(); |
13 | 13 | |
14 | 14 | // assumes HTTPURI to be in the form /tests/index.php?etc... |
15 | - $this->baseUrl = $this->args['HTTPSERVER'] . preg_replace('|\?.+|', '', $this->args['HTTPURI']); |
|
16 | - $this->coverageScriptUrl = 'http://' . $this->args['HTTPSERVER'] . preg_replace('|/tests/index\.php(\?.*)?|', '/tests/phpunit_coverage.php', $this->args['HTTPURI']); |
|
15 | + $this->baseUrl = $this->args['HTTPSERVER'].preg_replace('|\?.+|', '', $this->args['HTTPURI']); |
|
16 | + $this->coverageScriptUrl = 'http://'.$this->args['HTTPSERVER'].preg_replace('|/tests/index\.php(\?.*)?|', '/tests/phpunit_coverage.php', $this->args['HTTPURI']); |
|
17 | 17 | } |
18 | 18 | |
19 | 19 | public function testBenchmark() |
@@ -1,11 +1,11 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -include_once __DIR__ . '/../lib/xmlrpc.inc'; |
|
4 | -include_once __DIR__ . '/../lib/xmlrpcs.inc'; |
|
3 | +include_once __DIR__.'/../lib/xmlrpc.inc'; |
|
4 | +include_once __DIR__.'/../lib/xmlrpcs.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\Runner\BaseTestRunner; |
11 | 11 | |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | $a = $e->decodeXml('<?xml version="1.0" encoding="US-ASCII" ?><value><string>€</string></value>'); |
101 | 101 | $this->assertEquals($string, $a->scalarVal()); |
102 | 102 | |
103 | - $i = $e->decodeXml('<?xml version="1.0" encoding="ISO-8859-15" ?><value><string>' . $string . '</string></value>'); |
|
103 | + $i = $e->decodeXml('<?xml version="1.0" encoding="ISO-8859-15" ?><value><string>'.$string.'</string></value>'); |
|
104 | 104 | $this->assertEquals($string, $i->scalarVal()); |
105 | 105 | |
106 | 106 | $u = $e->decodeXml('<?xml version="1.0" encoding="UTF-8" ?><value><string>€</string></value>'); |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -include_once __DIR__ . '/WebTestCase.php'; |
|
3 | +include_once __DIR__.'/WebTestCase.php'; |
|
4 | 4 | |
5 | 5 | /** |
6 | 6 | * Tests for php files in the 'demo' directory. |
@@ -12,8 +12,8 @@ discard block |
||
12 | 12 | $this->args = argParser::getArgs(); |
13 | 13 | |
14 | 14 | // assumes HTTPURI to be in the form /tests/index.php?etc... |
15 | - $this->baseUrl = $this->args['HTTPSERVER'] . preg_replace('|\?.+|', '', $this->args['HTTPURI']); |
|
16 | - $this->coverageScriptUrl = 'http://' . $this->args['HTTPSERVER'] . preg_replace('|/tests/index\.php(\?.*)?|', '/tests/phpunit_coverage.php', $this->args['HTTPURI']); |
|
15 | + $this->baseUrl = $this->args['HTTPSERVER'].preg_replace('|\?.+|', '', $this->args['HTTPURI']); |
|
16 | + $this->coverageScriptUrl = 'http://'.$this->args['HTTPSERVER'].preg_replace('|/tests/index\.php(\?.*)?|', '/tests/phpunit_coverage.php', $this->args['HTTPURI']); |
|
17 | 17 | } |
18 | 18 | |
19 | 19 | public function testVardemo() |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -include_once __DIR__ . '/WebTestCase.php'; |
|
3 | +include_once __DIR__.'/WebTestCase.php'; |
|
4 | 4 | |
5 | 5 | /** |
6 | 6 | * Tests for the bundled debugger. |
@@ -12,8 +12,8 @@ discard block |
||
12 | 12 | $this->args = argParser::getArgs(); |
13 | 13 | |
14 | 14 | // assumes HTTPURI to be in the form /tests/index.php?etc... |
15 | - $this->baseUrl = $this->args['HTTPSERVER'] . preg_replace('|\?.+|', '', $this->args['HTTPURI']); |
|
16 | - $this->coverageScriptUrl = 'http://' . $this->args['HTTPSERVER'] . preg_replace('|/tests/index\.php(\?.*)?|', '/tests/phpunit_coverage.php', $this->args['HTTPURI']); |
|
15 | + $this->baseUrl = $this->args['HTTPSERVER'].preg_replace('|\?.+|', '', $this->args['HTTPURI']); |
|
16 | + $this->coverageScriptUrl = 'http://'.$this->args['HTTPSERVER'].preg_replace('|/tests/index\.php(\?.*)?|', '/tests/phpunit_coverage.php', $this->args['HTTPURI']); |
|
17 | 17 | } |
18 | 18 | |
19 | 19 | public function testIndex() |
@@ -1,11 +1,11 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -include_once __DIR__ . '/../lib/xmlrpc.inc'; |
|
4 | -include_once __DIR__ . '/../lib/xmlrpcs.inc'; |
|
3 | +include_once __DIR__.'/../lib/xmlrpc.inc'; |
|
4 | +include_once __DIR__.'/../lib/xmlrpcs.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\Runner\BaseTestRunner; |
11 | 11 | |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | |
104 | 104 | public function testI8() |
105 | 105 | { |
106 | - if (PHP_INT_SIZE == 4 ) { |
|
106 | + if (PHP_INT_SIZE == 4) { |
|
107 | 107 | $this->markTestSkipped('Can not test i8 as php is compiled in 32 bit mode'); |
108 | 108 | return; |
109 | 109 | } |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | |
134 | 134 | public function testUnicodeInMemberName() |
135 | 135 | { |
136 | - $str = "G" . chr(252) . "nter, El" . chr(232) . "ne"; |
|
136 | + $str = "G".chr(252)."nter, El".chr(232)."ne"; |
|
137 | 137 | $v = array($str => new xmlrpcval(1)); |
138 | 138 | $r = new xmlrpcresp(new xmlrpcval($v, 'struct')); |
139 | 139 | $r = $r->serialize(); |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | $response = @utf8_encode( |
150 | 150 | '<?xml version="1.0"?> |
151 | 151 | <!-- covers what happens when lib receives UTF8 chars in response text and comments --> |
152 | -<!-- ' . chr(224) . chr(252) . chr(232) . 'àüè --> |
|
152 | +<!-- ' . chr(224).chr(252).chr(232).'àüè --> |
|
153 | 153 | <methodResponse> |
154 | 154 | <fault> |
155 | 155 | <value> |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | </member> |
161 | 161 | <member> |
162 | 162 | <name>faultString</name> |
163 | -<value><string>' . chr(224) . chr(252) . chr(232) . 'àüè</string></value> |
|
163 | +<value><string>' . chr(224).chr(252).chr(232).'àüè</string></value> |
|
164 | 164 | </member> |
165 | 165 | </struct> |
166 | 166 | </value> |
@@ -169,7 +169,7 @@ discard block |
||
169 | 169 | $m = $this->newMsg('dummy'); |
170 | 170 | $r = $m->parseResponse($response); |
171 | 171 | $v = $r->faultString(); |
172 | - $this->assertEquals(chr(224) . chr(252) . chr(232) . chr(224) . chr(252) . chr(232), $v); |
|
172 | + $this->assertEquals(chr(224).chr(252).chr(232).chr(224).chr(252).chr(232), $v); |
|
173 | 173 | } |
174 | 174 | |
175 | 175 | public function testBrokenRequests() |
@@ -407,11 +407,11 @@ discard block |
||
407 | 407 | |
408 | 408 | public function testUTF8Response() |
409 | 409 | { |
410 | - $string = chr(224) . chr(252) . chr(232); |
|
410 | + $string = chr(224).chr(252).chr(232); |
|
411 | 411 | |
412 | 412 | $s = $this->newMsg('dummy'); |
413 | - $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> |
|
414 | -<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> |
|
413 | + $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> |
|
414 | +<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> |
|
415 | 415 | '; |
416 | 416 | $r = $s->parseResponse($f, false, 'phpvals'); |
417 | 417 | $v = $r->value(); |
@@ -419,7 +419,7 @@ discard block |
||
419 | 419 | $this->assertEquals($string, $v); |
420 | 420 | |
421 | 421 | $f = '<?xml version="1.0" encoding="UTF-8"?><methodResponse><params><param><value><struct><member><name>userid</name><value>311127</value></member> |
422 | -<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> |
|
422 | +<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> |
|
423 | 423 | '; |
424 | 424 | $r = $s->parseResponse($f, false, 'phpvals'); |
425 | 425 | $v = $r->value(); |
@@ -435,11 +435,11 @@ discard block |
||
435 | 435 | |
436 | 436 | public function testLatin1Response() |
437 | 437 | { |
438 | - $string = chr(224) . chr(252) . chr(232); |
|
438 | + $string = chr(224).chr(252).chr(232); |
|
439 | 439 | |
440 | 440 | $s = $this->newMsg('dummy'); |
441 | - $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> |
|
442 | -<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> |
|
441 | + $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> |
|
442 | +<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> |
|
443 | 443 | '; |
444 | 444 | $r = $s->parseResponse($f, false, 'phpvals'); |
445 | 445 | $v = $r->value(); |
@@ -447,7 +447,7 @@ discard block |
||
447 | 447 | $this->assertEquals($string, $v); |
448 | 448 | |
449 | 449 | $f = '<?xml version="1.0" encoding="ISO-8859-1"?><methodResponse><params><param><value><struct><member><name>userid</name><value>311127</value></member> |
450 | -<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> |
|
450 | +<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> |
|
451 | 451 | '; |
452 | 452 | $r = $s->parseResponse($f, false, 'phpvals'); |
453 | 453 | $v = $r->value(); |