Passed
Push — master ( acae57...1a1b0d )
by Gaetano
09:14
created
tests/ServerAwareTestCase.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
tests/WebTestCase.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-include_once __DIR__ . '/ServerAwareTestCase.php';
3
+include_once __DIR__.'/ServerAwareTestCase.php';
4 4
 
5 5
 abstract class PhpXmlRpc_WebTestCase extends PhpXmlRpc_ServerAwareTestCase
6 6
 {
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
      */
16 16
     protected function request($path, $method = 'GET', $payload = '', $emptyPageOk = false)
17 17
     {
18
-        $url = $this->baseUrl . $path;
18
+        $url = $this->baseUrl.$path;
19 19
 
20 20
         $ch = curl_init($url);
21 21
         curl_setopt_array($ch, array(
@@ -29,14 +29,14 @@  discard block
 block discarded – undo
29 29
                 CURLOPT_POSTFIELDS => $payload
30 30
             ));
31 31
         }
32
-        $cookie = 'PHPUNIT_RANDOM_TEST_ID=' . static::$randId;
32
+        $cookie = 'PHPUNIT_RANDOM_TEST_ID='.static::$randId;
33 33
         if ($this->collectCodeCoverageInformation)
34 34
         {
35
-            $cookie .= '; PHPUNIT_SELENIUM_TEST_ID=' . $this->testId;
35
+            $cookie .= '; PHPUNIT_SELENIUM_TEST_ID='.$this->testId;
36 36
         }
37 37
         curl_setopt($ch, CURLOPT_COOKIE, $cookie);
38 38
 
39
-        if ($this->args['DEBUG'] > 0) {
39
+        if ($this->args['DEBUG']>0) {
40 40
             curl_setopt($ch, CURLOPT_VERBOSE, 1);
41 41
         }
42 42
         $page = curl_exec($ch);
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
      */
62 62
     protected function newClient($path)
63 63
     {
64
-        $client = new \PhpXmlRpc\Client($this->baseUrl . $path);
64
+        $client = new \PhpXmlRpc\Client($this->baseUrl.$path);
65 65
         $client->setCookie('PHPUNIT_RANDOM_TEST_ID', static::$randId);
66 66
         if ($this->collectCodeCoverageInformation) {
67 67
             $client->setCookie('PHPUNIT_SELENIUM_TEST_ID', $this->testId);
Please login to merge, or discard this patch.
tests/09HTTPTest.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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,11 +344,11 @@  discard block
 block discarded – undo
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
             /// @todo we should probably look deeper into the Apache config / ssl version in use to find out why this
349 349
             ///       does not work well with TLS < 1.2
350 350
             if ($this->args['SSLVERSION'] == 0) {
351
-                $this->client->setSSLVersion(5 + $version[1]);
351
+                $this->client->setSSLVersion(5+$version[1]);
352 352
             }
353 353
         }
354 354
         $this->$method();
@@ -388,7 +388,7 @@  discard block
 block discarded – undo
388 388
         if (version_compare(PHP_VERSION, '8.0', '>=') && $this->args['SSLVERSION'] == 0)
389 389
         {
390 390
             $version = explode('.', PHP_VERSION);
391
-            $this->client->setSSLVersion(4 + $version[1]);
391
+            $this->client->setSSLVersion(4+$version[1]);
392 392
         }
393 393
 
394 394
         $this->$method();
Please login to merge, or discard this patch.