@@ -52,11 +52,11 @@ discard block |
||
52 | 52 | $testsPassed = substr_count($results, " passed. "); |
53 | 53 | $testsFailed = substr_count($results, " failed. "); |
54 | 54 | $testsTotal = $testsPassed + $testsFailed; |
55 | - static::printLine("Executed $testsTotal tests. $testsPassed passed, $testsFailed failed."); |
|
55 | + static::printLine("executed $testsTotal tests. $testsPassed passed, $testsFailed failed."); |
|
56 | 56 | $jobsExecuted = substr_count($results, "*Finished "); |
57 | 57 | $jobsSkipped = substr_count($results, "*Skipping "); |
58 | - if($jobsExecuted OR $jobsSkipped) { |
|
59 | - static::printLine("Executed $jobsExecuted job(s), skipped $jobsSkipped."); |
|
58 | + if($jobsExecuted or $jobsSkipped) { |
|
59 | + static::printLine("executed $jobsExecuted job(s), skipped $jobsSkipped."); |
|
60 | 60 | } |
61 | 61 | $time = \Tracy\Debugger::timer($timer); |
62 | 62 | static::printLine("Execution time: $time second(s)"); |
@@ -118,9 +118,9 @@ discard block |
||
118 | 118 | * @return void |
119 | 119 | */ |
120 | 120 | public static function printLine($text, $ignoreOutput = false) { |
121 | - if(static::$mode == "http" AND $ignoreOutput) { |
|
121 | + if(static::$mode == "http" and $ignoreOutput) { |
|
122 | 122 | echo "$text<br>\n"; |
123 | - } elseif(static::$mode == "http" AND static::$output == "screen") { |
|
123 | + } elseif(static::$mode == "http" and static::$output == "screen") { |
|
124 | 124 | echo "$text<br>\n"; |
125 | 125 | } else { |
126 | 126 | echo "$text\n"; |
@@ -39,7 +39,7 @@ |
||
39 | 39 | $classes = $robot->getIndexedClasses(); |
40 | 40 | foreach($classes as $class => $file) { |
41 | 41 | $rc = new \Nette\Reflection\ClassType($class); |
42 | - if(!$rc->isAbstract() AND $rc->isSubclassOf(TestCase::class)) { |
|
42 | + if(!$rc->isAbstract() and $rc->isSubclassOf(TestCase::class)) { |
|
43 | 43 | $suits[] = [$rc->getName(), $file]; |
44 | 44 | } |
45 | 45 | } |
@@ -206,7 +206,7 @@ |
||
206 | 206 | } else { |
207 | 207 | Environment::testResult("The variable is $type."); |
208 | 208 | } |
209 | - } elseif (!$value instanceof $type) { |
|
209 | + } elseif(!$value instanceof $type) { |
|
210 | 210 | $actual = is_object($value) ? get_class($value) : gettype($value); |
211 | 211 | Environment::testResult("The variable is instance of $actual.", false); |
212 | 212 | } else { |
@@ -107,10 +107,10 @@ discard block |
||
107 | 107 | * @return void |
108 | 108 | */ |
109 | 109 | public static function contains($needle, $actual) { |
110 | - if(!is_string($needle) AND !is_array($needle)) { |
|
110 | + if(!is_string($needle) and !is_array($needle)) { |
|
111 | 111 | Environment::testResult("The variable is not string or array.", false); |
112 | 112 | } elseif(is_string($actual)) { |
113 | - if($needle !== "" AND strpos($actual, $needle) !== FALSE) { |
|
113 | + if($needle !== "" and strpos($actual, $needle) !== FALSE) { |
|
114 | 114 | Environment::testResult("$needle is in the variable."); |
115 | 115 | } else { |
116 | 116 | Environment::testResult("$needle is not in the variable.", false); |
@@ -134,10 +134,10 @@ discard block |
||
134 | 134 | * @return void |
135 | 135 | */ |
136 | 136 | public static function notContains($needle, $actual) { |
137 | - if(!is_string($needle) AND !is_array($needle)) { |
|
137 | + if(!is_string($needle) and !is_array($needle)) { |
|
138 | 138 | Environment::testResult("The variable is not string or array.", false); |
139 | 139 | } elseif(is_string($actual)) { |
140 | - if($needle === "" OR strpos($actual, $needle) === FALSE) { |
|
140 | + if($needle === "" or strpos($actual, $needle) === FALSE) { |
|
141 | 141 | Environment::testResult("$needle is not in the variable."); |
142 | 142 | } else { |
143 | 143 | Environment::testResult("$needle is in the variable.", false); |
@@ -161,7 +161,7 @@ discard block |
||
161 | 161 | * @return void |
162 | 162 | */ |
163 | 163 | public static function count($count, $value) { |
164 | - if(!is_array($value) AND !$value instanceof \Countable) { |
|
164 | + if(!is_array($value) and !$value instanceof \Countable) { |
|
165 | 165 | Environment::testResult("The variable is not array or countable object.", false); |
166 | 166 | } elseif(count($value) == $count) { |
167 | 167 | Environment::testResult("Count of the variable is $count."); |
@@ -179,7 +179,7 @@ discard block |
||
179 | 179 | * @return void |
180 | 180 | */ |
181 | 181 | public static function notCount($count, $value) { |
182 | - if(!is_array($value) AND !$value instanceof \Countable) { |
|
182 | + if(!is_array($value) and !$value instanceof \Countable) { |
|
183 | 183 | Environment::testResult("The variable is not array or countable object.", false); |
184 | 184 | } elseif(count($value) == $count) { |
185 | 185 | $actual = count($value); |
@@ -197,7 +197,7 @@ discard block |
||
197 | 197 | * @return void |
198 | 198 | */ |
199 | 199 | public static function type($type, $value) { |
200 | - if(!is_object($type) AND !is_string($type)) { |
|
200 | + if(!is_object($type) and !is_string($type)) { |
|
201 | 201 | Environment::testResult("Type must be string or object.", false); |
202 | 202 | } elseif(in_array($type, ["array", "bool", "callable", "float", |
203 | 203 | "int", "integer", "null", "object", "resource", "scalar", "string"], true)) { |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | } elseif($value instanceof \Nette\Utils\ArrayHash) { |
30 | 30 | $skip = false; |
31 | 31 | foreach($value as $k => $v) { |
32 | - switch ($k) { |
|
32 | + switch($k) { |
|
33 | 33 | case "php": |
34 | 34 | $skip = version_compare(PHP_VERSION, $v, "<"); |
35 | 35 | break; |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | if(!$job->skip) { |
154 | 154 | $this->setUp(); |
155 | 155 | } |
156 | - $output = $job->execute(); |
|
156 | + $output = $job->execute(); |
|
157 | 157 | if(!$job->skip) { |
158 | 158 | $this->tearDown(); |
159 | 159 | } |
@@ -65,7 +65,7 @@ |
||
65 | 65 | $job = [ |
66 | 66 | "name" => $this->getJobName($rm), "callback" => [$this, $method], "params" => NULL, "skip" => $this->checkSkip($rm) |
67 | 67 | ]; |
68 | - if($rm->getNumberOfParameters() AND $rm->hasAnnotation("data")) { |
|
68 | + if($rm->getNumberOfParameters() and $rm->hasAnnotation("data")) { |
|
69 | 69 | $data = (array) $rm->getAnnotation("data"); |
70 | 70 | } |
71 | 71 | if(is_array($data)) { |
@@ -51,7 +51,7 @@ |
||
51 | 51 | public function execute() { |
52 | 52 | \Tracy\Debugger::timer($this->name); |
53 | 53 | Environment::resetCounter(); |
54 | - $output = ""; |
|
54 | + $output = ""; |
|
55 | 55 | ob_start(); |
56 | 56 | if($this->skip) { |
57 | 57 | Environment::printLine("****Skipping job $this->name****"); |