@@ -7,7 +7,7 @@ discard block |
||
7 | 7 | // In case this file is made available on an open-access server, avoid it being useable by anyone who can not also |
8 | 8 | // write a specific file to disk. |
9 | 9 | // NB: keep filename, cookie name in sync with the code within the TestCase classes sending http requests to this file |
10 | -$idFile = sys_get_temp_dir() . '/phpunit_rand_id.txt'; |
|
10 | +$idFile = sys_get_temp_dir().'/phpunit_rand_id.txt'; |
|
11 | 11 | $randId = isset($_COOKIE['PHPUNIT_RANDOM_TEST_ID']) ? $_COOKIE['PHPUNIT_RANDOM_TEST_ID'] : ''; |
12 | 12 | $fileId = file_exists($idFile) ? file_get_contents($idFile) : ''; |
13 | 13 | if ($randId == '' || $fileId == '' || $fileId !== $randId) { |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | chmod($GLOBALS['PHPUNIT_COVERAGE_DATA_DIRECTORY'], 0777); |
32 | 32 | } |
33 | 33 | |
34 | - include_once __DIR__ . "/../vendor/phpunit/phpunit-selenium/PHPUnit/Extensions/SeleniumCommon/prepend.php"; |
|
34 | + include_once __DIR__."/../vendor/phpunit/phpunit-selenium/PHPUnit/Extensions/SeleniumCommon/prepend.php"; |
|
35 | 35 | } |
36 | 36 | |
37 | 37 | $targetFile = null; |
@@ -54,5 +54,5 @@ discard block |
||
54 | 54 | } |
55 | 55 | |
56 | 56 | if (isset($_COOKIE['PHPUNIT_SELENIUM_TEST_ID']) && extension_loaded('xdebug')) { |
57 | - include_once __DIR__ . "/../vendor/phpunit/phpunit-selenium/PHPUnit/Extensions/SeleniumCommon/append.php"; |
|
57 | + include_once __DIR__."/../vendor/phpunit/phpunit-selenium/PHPUnit/Extensions/SeleniumCommon/append.php"; |
|
58 | 58 | } |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -include_once __DIR__ . '/LoggerAwareTestCase.php'; |
|
3 | +include_once __DIR__.'/LoggerAwareTestCase.php'; |
|
4 | 4 | |
5 | 5 | use PHPUnit\Extensions\SeleniumCommon\RemoteCoverage; |
6 | 6 | use PHPUnit\Framework\TestResult; |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | */ |
31 | 31 | public function _run($result = NULL) |
32 | 32 | { |
33 | - $this->testId = get_class($this) . '__' . $this->getName(); |
|
33 | + $this->testId = get_class($this).'__'.$this->getName(); |
|
34 | 34 | |
35 | 35 | if ($result === NULL) { |
36 | 36 | $result = $this->createResult(); |
@@ -62,13 +62,13 @@ discard block |
||
62 | 62 | |
63 | 63 | // Set up a database connection or other fixture which needs to be available. |
64 | 64 | self::$randId = uniqid(); |
65 | - file_put_contents(sys_get_temp_dir() . '/phpunit_rand_id.txt', self::$randId); |
|
65 | + file_put_contents(sys_get_temp_dir().'/phpunit_rand_id.txt', self::$randId); |
|
66 | 66 | } |
67 | 67 | |
68 | 68 | public static function tear_down_after_class() |
69 | 69 | { |
70 | - if (is_file(sys_get_temp_dir() . '/phpunit_rand_id.txt')) { |
|
71 | - unlink(sys_get_temp_dir() . '/phpunit_rand_id.txt'); |
|
70 | + if (is_file(sys_get_temp_dir().'/phpunit_rand_id.txt')) { |
|
71 | + unlink(sys_get_temp_dir().'/phpunit_rand_id.txt'); |
|
72 | 72 | } |
73 | 73 | |
74 | 74 | parent::tear_down_after_class(); |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | parent::set_up(); |
80 | 80 | |
81 | 81 | // assumes HTTPURI to be in the form /tests/index.php?etc... |
82 | - $this->baseUrl = 'http://' . $this->args['HTTPSERVER'] . preg_replace('|\?.+|', '', $this->args['HTTPURI']); |
|
83 | - $this->coverageScriptUrl = 'http://' . $this->args['HTTPSERVER'] . preg_replace('|/tests/index\.php(\?.*)?|', '/tests/phpunit_coverage.php', $this->args['HTTPURI']); |
|
82 | + $this->baseUrl = 'http://'.$this->args['HTTPSERVER'].preg_replace('|\?.+|', '', $this->args['HTTPURI']); |
|
83 | + $this->coverageScriptUrl = 'http://'.$this->args['HTTPSERVER'].preg_replace('|/tests/index\.php(\?.*)?|', '/tests/phpunit_coverage.php', $this->args['HTTPURI']); |
|
84 | 84 | } |
85 | 85 | } |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -include_once __DIR__ . '/08ServerTest.php'; |
|
3 | +include_once __DIR__.'/08ServerTest.php'; |
|
4 | 4 | |
5 | 5 | /** |
6 | 6 | * Tests which stress http features of the library. |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | ); |
26 | 26 | |
27 | 27 | $methods = array(); |
28 | - foreach(get_class_methods('ServerTest') as $method) |
|
28 | + foreach (get_class_methods('ServerTest') as $method) |
|
29 | 29 | { |
30 | 30 | if (strpos($method, 'test') === 0 && !in_array($method, $unsafeMethods)) |
31 | 31 | { |
@@ -295,7 +295,7 @@ discard block |
||
295 | 295 | if (version_compare(PHP_VERSION, '8.0', '>=') && $this->args['SSLVERSION'] == 0) |
296 | 296 | { |
297 | 297 | $version = explode('.', PHP_VERSION); |
298 | - $this->client->setSSLVersion(4 + $version[1]); |
|
298 | + $this->client->setSSLVersion(4+$version[1]); |
|
299 | 299 | } |
300 | 300 | |
301 | 301 | $this->$method(); |
@@ -325,7 +325,7 @@ discard block |
||
325 | 325 | preg_match('/ubunutu([0-9]+)/', $output[0], $matches); |
326 | 326 | $ubuntuVersion = @$matches[1]; |
327 | 327 | } |
328 | - if ($ubuntuVersion >= 20) { |
|
328 | + if ($ubuntuVersion>=20) { |
|
329 | 329 | $this->markTestSkipped('HTTPS via Socket known to fail on php less than 7.2 on Ubuntu 20 and higher'); |
330 | 330 | return; |
331 | 331 | } |
@@ -344,9 +344,9 @@ discard block |
||
344 | 344 | { |
345 | 345 | $version = explode('.', PHP_VERSION); |
346 | 346 | $this->client->setOption(\PhpXmlRpc\Client::OPT_EXTRA_SOCKET_OPTS, |
347 | - array('ssl' => array('security_level' => 2 + $version[1]))); |
|
347 | + array('ssl' => array('security_level' => 2+$version[1]))); |
|
348 | 348 | if ($this->args['SSLVERSION'] == 0) { |
349 | - $this->client->setSSLVersion(4 + $version[1]); |
|
349 | + $this->client->setSSLVersion(4+$version[1]); |
|
350 | 350 | } |
351 | 351 | } |
352 | 352 | |
@@ -387,7 +387,7 @@ discard block |
||
387 | 387 | if (version_compare(PHP_VERSION, '8.0', '>=') && $this->args['SSLVERSION'] == 0) |
388 | 388 | { |
389 | 389 | $version = explode('.', PHP_VERSION); |
390 | - $this->client->setSSLVersion(4 + $version[1]); |
|
390 | + $this->client->setSSLVersion(4+$version[1]); |
|
391 | 391 | } |
392 | 392 | |
393 | 393 | $this->$method(); |