@@ -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__ . '/5ServerTest.php'; |
|
| 8 | +include_once __DIR__.'/5ServerTest.php'; |
|
| 9 | 9 | |
| 10 | 10 | /** |
| 11 | 11 | * Tests which stress http features of the library. |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | ); |
| 28 | 28 | |
| 29 | 29 | $methods = array(); |
| 30 | - foreach(get_class_methods('ServerTest') as $method) |
|
| 30 | + foreach (get_class_methods('ServerTest') as $method) |
|
| 31 | 31 | { |
| 32 | 32 | if (strpos($method, 'test') === 0 && !in_array($method, $unsafeMethods)) |
| 33 | 33 | { |
@@ -201,8 +201,7 @@ discard block |
||
| 201 | 201 | { |
| 202 | 202 | $this->markTestSkipped('CURL missing: cannot test http 1.1 w. proxy'); |
| 203 | 203 | return; |
| 204 | - } |
|
| 205 | - else if ($this->args['PROXYSERVER'] == '') |
|
| 204 | + } else if ($this->args['PROXYSERVER'] == '') |
|
| 206 | 205 | { |
| 207 | 206 | $this->markTestSkipped('PROXYSERVER definition missing: cannot test proxy w. http 1.1'); |
| 208 | 207 | return; |
@@ -226,8 +225,7 @@ discard block |
||
| 226 | 225 | { |
| 227 | 226 | $this->markTestSkipped('CURL missing: cannot test https functionality'); |
| 228 | 227 | return; |
| 229 | - } |
|
| 230 | - else if ($this->args['HTTPSSERVER'] == '') |
|
| 228 | + } else if ($this->args['HTTPSSERVER'] == '') |
|
| 231 | 229 | { |
| 232 | 230 | $this->markTestSkipped('HTTPS SERVER definition missing: cannot test https'); |
| 233 | 231 | return; |
@@ -278,13 +276,11 @@ discard block |
||
| 278 | 276 | { |
| 279 | 277 | $this->markTestSkipped('CURL missing: cannot test https w. proxy'); |
| 280 | 278 | return; |
| 281 | - } |
|
| 282 | - else if ($this->args['PROXYSERVER'] == '') |
|
| 279 | + } else if ($this->args['PROXYSERVER'] == '') |
|
| 283 | 280 | { |
| 284 | 281 | $this->markTestSkipped('PROXYSERVER definition missing: cannot test proxy w. https'); |
| 285 | 282 | return; |
| 286 | - } |
|
| 287 | - else if ($this->args['HTTPSSERVER'] == '') |
|
| 283 | + } else if ($this->args['HTTPSSERVER'] == '') |
|
| 288 | 284 | { |
| 289 | 285 | $this->markTestSkipped('HTTPS SERVER definition missing: cannot test https w. proxy'); |
| 290 | 286 | return; |
@@ -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 | |
@@ -128,7 +128,7 @@ discard block |
||
| 128 | 128 | $this->assertequals(1, count($v1)); |
| 129 | 129 | $out = array('me' => array(), 'mytype' => 2, '_php_class' => null); |
| 130 | 130 | |
| 131 | - foreach($v1 as $key => $val) |
|
| 131 | + foreach ($v1 as $key => $val) |
|
| 132 | 132 | { |
| 133 | 133 | $this->assertArrayHasKey($key, $out); |
| 134 | 134 | $expected = $out[$key]; |
@@ -143,7 +143,7 @@ discard block |
||
| 143 | 143 | $this->assertequals(2, count($v2)); |
| 144 | 144 | $out = array(array('key' => 0, 'value' => 'object'), array('key' => 1, 'value' => 'object')); |
| 145 | 145 | $i = 0; |
| 146 | - foreach($v2 as $key => $val) |
|
| 146 | + foreach ($v2 as $key => $val) |
|
| 147 | 147 | { |
| 148 | 148 | $expected = $out[$i]; |
| 149 | 149 | $this->assertequals($expected['key'], $key); |
@@ -157,7 +157,7 @@ discard block |
||
| 157 | 157 | { |
| 158 | 158 | // nb: make sure that the serialized xml corresponding to this is > 10MB in size |
| 159 | 159 | $data = array(); |
| 160 | - for ($i = 0; $i < 500000; $i++ ) { |
|
| 160 | + for ($i = 0; $i<500000; $i++) { |
|
| 161 | 161 | $data[] = 'hello world'; |
| 162 | 162 | } |
| 163 | 163 | |
@@ -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 |