Passed
Push — master ( 991f00...ac18e3 )
by Gaetano
09:36
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/parse_args.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
         // check for command line params (passed as env vars) vs. web page input params (passed as GET/POST)
47 47
         // Note that the only use-case for web-page mode is when this is used by benchmark.php
48 48
         if (!isset($_SERVER['REQUEST_METHOD'])) {
49
-            foreach($_SERVER as $key => $val) {
49
+            foreach ($_SERVER as $key => $val) {
50 50
                 if (array_key_exists($key, $args)) {
51 51
                     $$key = $val;
52 52
                 }
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
             //}
92 92
         }
93 93
         if ($HTTPURI[0] != '/') {
94
-            $HTTPURI = '/' . $HTTPURI;
94
+            $HTTPURI = '/'.$HTTPURI;
95 95
         }
96 96
         $args['HTTPURI'] = $HTTPURI;
97 97
 
@@ -105,21 +105,21 @@  discard block
 block discarded – undo
105 105
         }
106 106
 
107 107
         if (isset($HTTPSIGNOREPEER)) {
108
-            $args['HTTPSIGNOREPEER'] = (bool)$HTTPSIGNOREPEER;
108
+            $args['HTTPSIGNOREPEER'] = (bool) $HTTPSIGNOREPEER;
109 109
         }
110 110
 
111 111
         if (isset($HTTPSVERIFYHOST)) {
112
-            $args['HTTPSVERIFYHOST'] = (int)$HTTPSVERIFYHOST;
112
+            $args['HTTPSVERIFYHOST'] = (int) $HTTPSVERIFYHOST;
113 113
         }
114 114
 
115 115
         if (isset($SSLVERSION)) {
116
-            $args['SSLVERSION'] = (int)$SSLVERSION;
116
+            $args['SSLVERSION'] = (int) $SSLVERSION;
117 117
         }
118 118
 
119 119
         if (isset($PROXYSERVER)) {
120 120
             $arr = explode(':', $PROXYSERVER);
121 121
             $args['PROXYSERVER'] = $arr[0];
122
-            if (count($arr) > 1) {
122
+            if (count($arr)>1) {
123 123
                 $args['PROXYPORT'] = $arr[1];
124 124
             } else {
125 125
                 $args['PROXYPORT'] = 8080;
Please login to merge, or discard this patch.
demo/server/legacy.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -5,8 +5,8 @@
 block discarded – undo
5 5
  * It mimics server.php, but does not rely on other autoload mechanisms than the loading of xmlrpc.inc and xmlrpcs.inc
6 6
  */
7 7
 
8
-require_once __DIR__ . "/../../lib/xmlrpc.inc";
9
-require_once __DIR__ . "/../../lib/xmlrpcs.inc";
8
+require_once __DIR__."/../../lib/xmlrpc.inc";
9
+require_once __DIR__."/../../lib/xmlrpcs.inc";
10 10
 
11 11
 $signatures1 = include(__DIR__.'/methodProviders/functions.php');
12 12
 $signatures2 = include(__DIR__.'/methodProviders/interop.php');
Please login to merge, or discard this patch.
tests/legacy_loader_test.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -4,16 +4,16 @@  discard block
 block discarded – undo
4 4
  * A test file designed to test the legacy API class-loading mechanism, ie. not using phpunit/composer's autoload_
5 5
  */
6 6
 
7
-include_once __DIR__ . '/../lib/xmlrpc.inc';
8
-include_once __DIR__ . '/../lib/xmlrpcs.inc';
7
+include_once __DIR__.'/../lib/xmlrpc.inc';
8
+include_once __DIR__.'/../lib/xmlrpcs.inc';
9 9
 
10
-include_once __DIR__ . '/parse_args.php';
10
+include_once __DIR__.'/parse_args.php';
11 11
 
12 12
 $args = argParser::getArgs();
13
-$baseurl = 'http://' . $args['HTTPSERVER'] . str_replace('/server.php', '/legacy.php', $args['HTTPURI']);
13
+$baseurl = 'http://'.$args['HTTPSERVER'].str_replace('/server.php', '/legacy.php', $args['HTTPURI']);
14 14
 
15 15
 $randId = uniqid();
16
-file_put_contents(sys_get_temp_dir() . '/phpunit_rand_id.txt', $randId);
16
+file_put_contents(sys_get_temp_dir().'/phpunit_rand_id.txt', $randId);
17 17
 
18 18
 $client = new xmlrpc_client($baseurl);
19 19
 $client->setCookie('PHPUNIT_RANDOM_TEST_ID', $randId);
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
 $req = new xmlrpcmsg('system.listMethods', array());
22 22
 $resp = $client->send($req);
23 23
 if ($resp->faultCode() !== 0) {
24
-    throw new \Exception("system.listMethods returned fault " . $resp->faultCode());
24
+    throw new \Exception("system.listMethods returned fault ".$resp->faultCode());
25 25
 }
26 26
 
27
-unlink(sys_get_temp_dir() . '/phpunit_rand_id.txt');
27
+unlink(sys_get_temp_dir().'/phpunit_rand_id.txt');
Please login to merge, or discard this patch.
tests/13LegacyAPITest.php 1 patch
Spacing   +2 added lines, -2 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
 /**
6 6
  * Long-term, this should replace all testing of the legacy API done via the main test-suite...
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
     {
12 12
         /// @todo pass on as cli args for the executed script all the args that are already parsed by now
13 13
 
14
-        exec('php ' . __DIR__ . '/legacy_loader_test.php', $out, $result);
14
+        exec('php '.__DIR__.'/legacy_loader_test.php', $out, $result);
15 15
 
16 16
         /// @todo dump output if in debug mode or if test fails
17 17
 
Please login to merge, or discard this patch.