Passed
Push — develop ( caaedb...80cbaf )
by Nikolay
08:50 queued 03:31
created
tests/AdminCabinet/Lib/globals.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -1,33 +1,33 @@
 block discarded – undo
1 1
 <?php 
2 2
 
3 3
 $config_file = getenv('CONFIG_FILE');
4
-if(!file_exists($config_file)) {
4
+if (!file_exists($config_file)) {
5 5
     $config_file = 'config/local.conf.json';
6 6
 }
7
-if(!file_exists($config_file)) {
7
+if (!file_exists($config_file)) {
8 8
     $config_file = '../config/local.conf.json';
9 9
 }
10 10
 $GLOBALS['CONFIG'] = json_decode(file_get_contents($config_file), true);
11 11
 
12 12
 $GLOBALS['BROWSERSTACK_USERNAME'] = getenv('BROWSERSTACK_USERNAME');
13
-if(!$GLOBALS['BROWSERSTACK_USERNAME']) $GLOBALS['BROWSERSTACK_USERNAME'] = $GLOBALS['CONFIG']['user'];
13
+if (!$GLOBALS['BROWSERSTACK_USERNAME']) $GLOBALS['BROWSERSTACK_USERNAME'] = $GLOBALS['CONFIG']['user'];
14 14
 
15 15
 $GLOBALS['BROWSERSTACK_ACCESS_KEY'] = getenv('BROWSERSTACK_ACCESS_KEY');
16
-if(!$GLOBALS['BROWSERSTACK_ACCESS_KEY']) $GLOBALS['BROWSERSTACK_ACCESS_KEY'] = $GLOBALS['CONFIG']['key'];
16
+if (!$GLOBALS['BROWSERSTACK_ACCESS_KEY']) $GLOBALS['BROWSERSTACK_ACCESS_KEY'] = $GLOBALS['CONFIG']['key'];
17 17
 
18 18
 $GLOBALS['SERVER_PBX'] = getenv('SERVER_PBX');
19
-if(!$GLOBALS['SERVER_PBX']) {
20
-    $GLOBALS['SERVER_PBX']='https://172.16.32.72';
19
+if (!$GLOBALS['SERVER_PBX']) {
20
+    $GLOBALS['SERVER_PBX'] = 'https://172.16.32.72';
21 21
 }
22 22
 
23 23
 $GLOBALS['BUILD_NUMBER'] = getenv('BUILD_NUMBER');
24
-if(!$GLOBALS['BUILD_NUMBER']) {
25
-    $GLOBALS['BUILD_NUMBER']='Unknown';
24
+if (!$GLOBALS['BUILD_NUMBER']) {
25
+    $GLOBALS['BUILD_NUMBER'] = 'Unknown';
26 26
 }
27 27
 
28 28
 $GLOBALS['MIKO_LICENSE_KEY'] = getenv('MIKO_LICENSE_KEY');
29
-if(!$GLOBALS['MIKO_LICENSE_KEY']) {
30
-    $GLOBALS['MIKO_LICENSE_KEY']=$GLOBALS['CONFIG']['MIKO_LICENSE_KEY'];
29
+if (!$GLOBALS['MIKO_LICENSE_KEY']) {
30
+    $GLOBALS['MIKO_LICENSE_KEY'] = $GLOBALS['CONFIG']['MIKO_LICENSE_KEY'];
31 31
 }
32 32
 
33 33
 
Please login to merge, or discard this patch.
tests/AdminCabinet/Lib/MikoPBXTestsBase.php 1 patch
Spacing   +74 added lines, -74 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
     {
32 32
         $els = self::$driver->findElements($by);
33 33
         if (count($els)) {
34
-            $this->fail("Unexpectedly element was found by " . $by . PHP_EOL);
34
+            $this->fail("Unexpectedly element was found by ".$by.PHP_EOL);
35 35
         }
36 36
         // increment assertion counter
37 37
         $this->assertTrue(true);
@@ -46,16 +46,16 @@  discard block
 block discarded – undo
46 46
      */
47 47
     protected function selectDropdownItem(string $name, string $value): void
48 48
     {
49
-        $xpath = '//select[@name="' . $name . '"]/ancestor::div[contains(@class, "ui") and contains(@class ,"dropdown")]';
50
-        $xpath .='| //div[@id="' . $name . '" and contains(@class, "ui") and contains(@class ,"dropdown") ]';
49
+        $xpath = '//select[@name="'.$name.'"]/ancestor::div[contains(@class, "ui") and contains(@class ,"dropdown")]';
50
+        $xpath .= '| //div[@id="'.$name.'" and contains(@class, "ui") and contains(@class ,"dropdown") ]';
51 51
         try {
52 52
             $selectItem = self::$driver->findElement(WebDriverBy::xpath($xpath));
53 53
             $selectItem->click();
54 54
             $this->waitForAjax();
55 55
 
56 56
             // If search field exists input them before select
57
-            $xpath = '//select[@name="' . $name . '"]/ancestor::div[contains(@class, "ui") and contains(@class ,"dropdown")]/input[contains(@class,"search")]';
58
-            $xpath .='| //div[@id="' . $name . '" and contains(@class, "ui") and contains(@class ,"dropdown") ]/input[contains(@class,"search")]';
57
+            $xpath = '//select[@name="'.$name.'"]/ancestor::div[contains(@class, "ui") and contains(@class ,"dropdown")]/input[contains(@class,"search")]';
58
+            $xpath .= '| //div[@id="'.$name.'" and contains(@class, "ui") and contains(@class ,"dropdown") ]/input[contains(@class,"search")]';
59 59
             $inputItems = self::$driver->findElements(WebDriverBy::xpath($xpath));
60 60
             $actions = new WebDriverActions(self::$driver);
61 61
             foreach ($inputItems as $inputItem) {
@@ -67,17 +67,17 @@  discard block
 block discarded – undo
67 67
             }
68 68
 
69 69
             // Находим строчку с нужной опцией по значению
70
-            $xpath    = '//div[contains(@class, "menu") and contains(@class ,"visible")]/div[@data-value="' . $value . '"]';
70
+            $xpath    = '//div[contains(@class, "menu") and contains(@class ,"visible")]/div[@data-value="'.$value.'"]';
71 71
             $menuItem = self::$driver->wait()->until(
72 72
                 WebDriverExpectedCondition::presenceOfElementLocated(WebDriverBy::xpath($xpath))
73 73
             );
74 74
             $menuItem->click();
75 75
         } catch (NoSuchElementException $e) {
76
-            $this->fail('Not found select with name ' . $name . 'on selectDropdownItem'. PHP_EOL);
76
+            $this->fail('Not found select with name '.$name.'on selectDropdownItem'.PHP_EOL);
77 77
         } catch (TimeoutException $e) {
78
-            $this->fail('Not found menuitem ' . $value . PHP_EOL);
78
+            $this->fail('Not found menuitem '.$value.PHP_EOL);
79 79
         } catch (Exception $e) {
80
-            $this->fail('Unknown error ' . $e->getMessage() . PHP_EOL);
80
+            $this->fail('Unknown error '.$e->getMessage().PHP_EOL);
81 81
         }
82 82
     }
83 83
 
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
     {
89 89
         while (true) // Handle timeout somewhere
90 90
         {
91
-            $ajaxIsComplete = (bool)(self::$driver->executeScript("return jQuery.active == 0"));
91
+            $ajaxIsComplete = (bool) (self::$driver->executeScript("return jQuery.active == 0"));
92 92
             if ($ajaxIsComplete) {
93 93
                 break;
94 94
             }
@@ -103,10 +103,10 @@  discard block
 block discarded – undo
103 103
      * @param      $checkedValue string checked value
104 104
      * @param bool $skipIfNotExist
105 105
      */
106
-    protected function assertMenuItemSelected(string $name, string $checkedValue, $skipIfNotExist=false): void
106
+    protected function assertMenuItemSelected(string $name, string $checkedValue, $skipIfNotExist = false): void
107 107
     {
108
-        $xpath             = '//select[@name="' . $name . '"]/option[@selected="selected"]';
109
-        if ($checkedValue==='none'){
108
+        $xpath = '//select[@name="'.$name.'"]/option[@selected="selected"]';
109
+        if ($checkedValue === 'none') {
110 110
             $this->assertElementNotFound(WebDriverBy::xpath($xpath));
111 111
         } else {
112 112
             $selectedExtensions = self::$driver->findElements(WebDriverBy::xpath($xpath));
@@ -115,8 +115,8 @@  discard block
 block discarded – undo
115 115
                 $message      = "{$name} check failure, because {$checkedValue} != {$currentValue}";
116 116
                 $this->assertEquals($checkedValue, $currentValue, $message);
117 117
             }
118
-            if (!$skipIfNotExist && count($selectedExtensions)===0){
119
-                $this->fail('Not found select with name ' . $name .' in assertMenuItemSelected'. PHP_EOL);
118
+            if (!$skipIfNotExist && count($selectedExtensions) === 0) {
119
+                $this->fail('Not found select with name '.$name.' in assertMenuItemSelected'.PHP_EOL);
120 120
             }
121 121
         }
122 122
     }
@@ -128,9 +128,9 @@  discard block
 block discarded – undo
128 128
      * @param string $value
129 129
      * @param bool   $skipIfNotExist
130 130
      */
131
-    protected function changeTextAreaValue(string $name, string $value, bool $skipIfNotExist=false): void
131
+    protected function changeTextAreaValue(string $name, string $value, bool $skipIfNotExist = false): void
132 132
     {
133
-        $xpath         = ('//textarea[@name="' . $name . '"]');
133
+        $xpath         = ('//textarea[@name="'.$name.'"]');
134 134
         $textAreaItems = self::$driver->findElements(WebDriverBy::xpath($xpath));
135 135
         $actions = new WebDriverActions(self::$driver);
136 136
         foreach ($textAreaItems as $textAreaItem) {
@@ -140,8 +140,8 @@  discard block
 block discarded – undo
140 140
             $textAreaItem->clear();
141 141
             $textAreaItem->sendKeys($value);
142 142
         }
143
-        if (!$skipIfNotExist && count($textAreaItems)===0){
144
-            $this->fail('Not found textarea with name ' . $name .' in changeTextAreaValue'. PHP_EOL);
143
+        if (!$skipIfNotExist && count($textAreaItems) === 0) {
144
+            $this->fail('Not found textarea with name '.$name.' in changeTextAreaValue'.PHP_EOL);
145 145
         }
146 146
     }
147 147
 
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
      */
154 154
     protected function assertTextAreaValueIsEqual(string $name, string $checkedValue): void
155 155
     {
156
-        $xpath        = '//textarea[@name="' . $name . '"]';
156
+        $xpath        = '//textarea[@name="'.$name.'"]';
157 157
         $textAreaItem = self::$driver->findElement(WebDriverBy::xpath($xpath));
158 158
         $currentValue = $textAreaItem->getAttribute('value');
159 159
         $message      = "{$name} check failure, because {$checkedValue} != {$currentValue}";
@@ -167,15 +167,15 @@  discard block
 block discarded – undo
167 167
      * @param string $value
168 168
      * @param bool   $skipIfNotExist
169 169
      */
170
-    protected function changeFileField(string $name, string $value, bool $skipIfNotExist=false): void
170
+    protected function changeFileField(string $name, string $value, bool $skipIfNotExist = false): void
171 171
     {
172
-        $xpath      = '//input[@name="' . $name . '" and (@type = "file")]';
172
+        $xpath      = '//input[@name="'.$name.'" and (@type = "file")]';
173 173
         $inputItems = self::$driver->findElements(WebDriverBy::xpath($xpath));
174 174
         foreach ($inputItems as $inputItem) {
175 175
             $inputItem->sendKeys($value);
176 176
         }
177
-        if (!$skipIfNotExist && count($inputItems)===0){
178
-            $this->fail('Not found input with type FILE and with name ' . $name .' in changeFileField'. PHP_EOL);
177
+        if (!$skipIfNotExist && count($inputItems) === 0) {
178
+            $this->fail('Not found input with type FILE and with name '.$name.' in changeFileField'.PHP_EOL);
179 179
         }
180 180
     }
181 181
 
@@ -186,9 +186,9 @@  discard block
 block discarded – undo
186 186
      * @param string $value
187 187
      * @param bool   $skipIfNotExist
188 188
      */
189
-    protected function changeInputField(string $name, string $value, bool $skipIfNotExist=false): void
189
+    protected function changeInputField(string $name, string $value, bool $skipIfNotExist = false): void
190 190
     {
191
-        $xpath      = '//input[@name="' . $name . '" and (@type="text" or @type="password" or @type="hidden" or @type="number")]';
191
+        $xpath      = '//input[@name="'.$name.'" and (@type="text" or @type="password" or @type="hidden" or @type="number")]';
192 192
         $inputItems = self::$driver->findElements(WebDriverBy::xpath($xpath));
193 193
         $actions = new WebDriverActions(self::$driver);
194 194
         foreach ($inputItems as $inputItem) {
@@ -198,8 +198,8 @@  discard block
 block discarded – undo
198 198
             $inputItem->clear();
199 199
             $inputItem->sendKeys($value);
200 200
         }
201
-        if (!$skipIfNotExist && count($inputItems)===0){
202
-            $this->fail('Not found input with name ' . $name .' in changeInputField'. PHP_EOL);
201
+        if (!$skipIfNotExist && count($inputItems) === 0) {
202
+            $this->fail('Not found input with name '.$name.' in changeInputField'.PHP_EOL);
203 203
         }
204 204
     }
205 205
 
@@ -210,17 +210,17 @@  discard block
 block discarded – undo
210 210
      * @param string $checkedValue
211 211
      * @param bool   $skipIfNotExist
212 212
      */
213
-    protected function assertInputFieldValueEqual(string $name, string $checkedValue, $skipIfNotExist=false): void
213
+    protected function assertInputFieldValueEqual(string $name, string $checkedValue, $skipIfNotExist = false): void
214 214
     {
215
-        $xpath      = '//input[@name="' . $name . '" and (@type="text" or @type="number" or @type="password" or @type="hidden")]';
215
+        $xpath      = '//input[@name="'.$name.'" and (@type="text" or @type="number" or @type="password" or @type="hidden")]';
216 216
         $inputItems = self::$driver->findElements(WebDriverBy::xpath($xpath));
217 217
         foreach ($inputItems as $inputItem) {
218 218
             $currentValue = $inputItem->getAttribute('value');
219 219
             $message      = "input field: '{$name}' check failure, because {$checkedValue} != {$currentValue}";
220 220
             $this->assertEquals($checkedValue, $currentValue, $message);
221 221
         }
222
-        if (!$skipIfNotExist && count($inputItems)===0){
223
-            $this->fail('Not found input with name ' . $name .' in assertInputFieldValueEqual'. PHP_EOL);
222
+        if (!$skipIfNotExist && count($inputItems) === 0) {
223
+            $this->fail('Not found input with name '.$name.' in assertInputFieldValueEqual'.PHP_EOL);
224 224
         }
225 225
     }
226 226
 
@@ -231,17 +231,17 @@  discard block
 block discarded – undo
231 231
      * @param bool   $enabled
232 232
      * @param bool   $skipIfNotExist
233 233
      */
234
-    protected function changeCheckBoxState(string $name, bool $enabled, $skipIfNotExist=false): void
234
+    protected function changeCheckBoxState(string $name, bool $enabled, $skipIfNotExist = false): void
235 235
     {
236
-        $xpath         = '//input[@name="' . $name . '" and @type="checkbox"]';
236
+        $xpath         = '//input[@name="'.$name.'" and @type="checkbox"]';
237 237
         $checkBoxItems = self::$driver->findElements(WebDriverBy::xpath($xpath));
238 238
         foreach ($checkBoxItems as $checkBoxItem) {
239 239
             if (
240
-                ($enabled && ! $checkBoxItem->isSelected())
240
+                ($enabled && !$checkBoxItem->isSelected())
241 241
                 ||
242
-                ( ! $enabled && $checkBoxItem->isSelected())
242
+                (!$enabled && $checkBoxItem->isSelected())
243 243
             ) {
244
-                $xpath        = '//input[@name="' . $name . '" and @type="checkbox"]/parent::div';
244
+                $xpath        = '//input[@name="'.$name.'" and @type="checkbox"]/parent::div';
245 245
                 $checkBoxItem = self::$driver->findElement(WebDriverBy::xpath($xpath));
246 246
                 $actions = new WebDriverActions(self::$driver);
247 247
                 $actions->moveToElement($checkBoxItem);
@@ -249,8 +249,8 @@  discard block
 block discarded – undo
249 249
                 $checkBoxItem->click();
250 250
             }
251 251
         }
252
-        if (!$skipIfNotExist && count($checkBoxItems)===0){
253
-            $this->fail('Not found checkbox with name ' . $name .' in changeCheckBoxState'. PHP_EOL);
252
+        if (!$skipIfNotExist && count($checkBoxItems) === 0) {
253
+            $this->fail('Not found checkbox with name '.$name.' in changeCheckBoxState'.PHP_EOL);
254 254
         }
255 255
     }
256 256
 
@@ -261,19 +261,19 @@  discard block
 block discarded – undo
261 261
      * @param bool   $enabled checked state
262 262
      * @param bool   $skipIfNotExist
263 263
      */
264
-    protected function assertCheckBoxStageIsEqual(string $name, bool $enabled, $skipIfNotExist=false): void
264
+    protected function assertCheckBoxStageIsEqual(string $name, bool $enabled, $skipIfNotExist = false): void
265 265
     {
266
-        $xpath         = '//input[@name="' . $name . '" and @type="checkbox"]';
266
+        $xpath         = '//input[@name="'.$name.'" and @type="checkbox"]';
267 267
         $checkBoxItems = self::$driver->findElements(WebDriverBy::xpath($xpath));
268 268
         foreach ($checkBoxItems as $checkBoxItem) {
269 269
             if ($enabled) {
270
-                $this->assertTrue($checkBoxItem->isSelected(), "{$name} must be checked" . PHP_EOL);
270
+                $this->assertTrue($checkBoxItem->isSelected(), "{$name} must be checked".PHP_EOL);
271 271
             } else {
272
-                $this->assertFalse($checkBoxItem->isSelected(), "{$name} must be unchecked" . PHP_EOL);
272
+                $this->assertFalse($checkBoxItem->isSelected(), "{$name} must be unchecked".PHP_EOL);
273 273
             }
274 274
         }
275
-        if (!$skipIfNotExist && count($checkBoxItems)===0){
276
-            $this->fail('Not found checkbox with name ' . $name .' in assertCheckBoxStageIsEqual'. PHP_EOL);
275
+        if (!$skipIfNotExist && count($checkBoxItems) === 0) {
276
+            $this->fail('Not found checkbox with name '.$name.' in assertCheckBoxStageIsEqual'.PHP_EOL);
277 277
         }
278 278
     }
279 279
 
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
      */
286 286
     protected function submitForm(string $formId): void
287 287
     {
288
-        $xpath = '//form[@id="' . $formId . '"]//ancestor::div[@id="submitbutton"]';
288
+        $xpath = '//form[@id="'.$formId.'"]//ancestor::div[@id="submitbutton"]';
289 289
         try {
290 290
             $button_Submit = self::$driver->findElement(WebDriverBy::xpath($xpath));
291 291
             $actions = new WebDriverActions(self::$driver);
@@ -294,18 +294,18 @@  discard block
 block discarded – undo
294 294
             $button_Submit->click();
295 295
             $this->waitForAjax();
296 296
             self::$driver->wait(10, 500)->until(
297
-                function ($driver) use ($xpath) {
297
+                function($driver) use ($xpath) {
298 298
                     $button_Submit = $driver->findElement(WebDriverBy::xpath($xpath));
299 299
 
300 300
                     return $button_Submit->isEnabled();
301 301
                 }
302 302
             );
303 303
         } catch (NoSuchElementException $e) {
304
-            $this->fail('Not found submit button on this page' . PHP_EOL);
304
+            $this->fail('Not found submit button on this page'.PHP_EOL);
305 305
         } catch (TimeoutException $e) {
306
-            $this->fail('Form doesn\'t send after 10 seconds timeout' . PHP_EOL);
306
+            $this->fail('Form doesn\'t send after 10 seconds timeout'.PHP_EOL);
307 307
         } catch (Exception $e) {
308
-            $this->fail('Unknown error ' . $e->getMessage() . PHP_EOL);
308
+            $this->fail('Unknown error '.$e->getMessage().PHP_EOL);
309 309
         }
310 310
     }
311 311
 
@@ -317,7 +317,7 @@  discard block
 block discarded – undo
317 317
     protected function clickSidebarMenuItemByHref(string $href): void
318 318
     {
319 319
         try {
320
-            $xpath       = '//div[@id="sidebar-menu"]//ancestor::a[contains(@class, "item") and contains(@href ,"' . $href . '")]';
320
+            $xpath       = '//div[@id="sidebar-menu"]//ancestor::a[contains(@class, "item") and contains(@href ,"'.$href.'")]';
321 321
             $sidebarItem = self::$driver->findElement(WebDriverBy::xpath($xpath));
322 322
             $actions = new WebDriverActions(self::$driver);
323 323
             $actions->moveToElement($sidebarItem);
@@ -325,9 +325,9 @@  discard block
 block discarded – undo
325 325
             $sidebarItem->click();
326 326
             $this->waitForAjax();
327 327
         } catch (NoSuchElementException $e) {
328
-            $this->fail('Not found sidebar item with href=' . $href . ' on this page' . PHP_EOL);
328
+            $this->fail('Not found sidebar item with href='.$href.' on this page'.PHP_EOL);
329 329
         } catch (Exception $e) {
330
-            $this->fail('Unknown error ' . $e->getMessage() . PHP_EOL);
330
+            $this->fail('Unknown error '.$e->getMessage().PHP_EOL);
331 331
         }
332 332
     }
333 333
 
@@ -338,7 +338,7 @@  discard block
 block discarded – undo
338 338
      */
339 339
     protected function clickModifyButtonOnRowWithText(string $text): void
340 340
     {
341
-        $xpath = ('//td[contains(text(),"' . $text . '")]/parent::tr[contains(@class, "row")]//a[contains(@href,"modify")]');
341
+        $xpath = ('//td[contains(text(),"'.$text.'")]/parent::tr[contains(@class, "row")]//a[contains(@href,"modify")]');
342 342
         try {
343 343
             $tableButtonModify = self::$driver->findElement(WebDriverBy::xpath($xpath));
344 344
             $actions = new WebDriverActions(self::$driver);
@@ -347,9 +347,9 @@  discard block
 block discarded – undo
347 347
             $tableButtonModify->click();
348 348
             $this->waitForAjax();
349 349
         } catch (NoSuchElementException $e) {
350
-            $this->fail('Not found row with text=' . $text . ' on this page' . PHP_EOL);
350
+            $this->fail('Not found row with text='.$text.' on this page'.PHP_EOL);
351 351
         } catch (Exception $e) {
352
-            $this->fail('Unknown error ' . $e->getMessage() . PHP_EOL);
352
+            $this->fail('Unknown error '.$e->getMessage().PHP_EOL);
353 353
         }
354 354
     }
355 355
 
@@ -360,7 +360,7 @@  discard block
 block discarded – undo
360 360
      */
361 361
     protected function clickModifyButtonOnRowWithID(string $id): void
362 362
     {
363
-        $xpath = ('//tr[contains(@class, "row") and @id="' . $id . '"]//a[contains(@href,"modify")]');
363
+        $xpath = ('//tr[contains(@class, "row") and @id="'.$id.'"]//a[contains(@href,"modify")]');
364 364
         try {
365 365
             $tableButtonModify = self::$driver->findElement(WebDriverBy::xpath($xpath));
366 366
             $actions = new WebDriverActions(self::$driver);
@@ -369,9 +369,9 @@  discard block
 block discarded – undo
369 369
             $tableButtonModify->click();
370 370
             $this->waitForAjax();
371 371
         } catch (NoSuchElementException $e) {
372
-            $this->fail('Not found row with id=' . $id . ' on this page' . PHP_EOL);
372
+            $this->fail('Not found row with id='.$id.' on this page'.PHP_EOL);
373 373
         } catch (Exception $e) {
374
-            $this->fail('Unknown error ' . $e->getMessage() . PHP_EOL);
374
+            $this->fail('Unknown error '.$e->getMessage().PHP_EOL);
375 375
         }
376 376
     }
377 377
 
@@ -382,19 +382,19 @@  discard block
 block discarded – undo
382 382
      */
383 383
     protected function clickDeleteButtonOnRowWithText(string $text): void
384 384
     {
385
-        $xpath = ('//td[contains(text(),"' . $text . '")]/ancestor::tr[contains(@class, "row")]//a[contains(@href,"delete")]');
385
+        $xpath = ('//td[contains(text(),"'.$text.'")]/ancestor::tr[contains(@class, "row")]//a[contains(@href,"delete")]');
386 386
         try {
387 387
             $deleteButtons = self::$driver->findElements(WebDriverBy::xpath($xpath));
388
-            foreach ($deleteButtons as $deleteButton){
388
+            foreach ($deleteButtons as $deleteButton) {
389 389
                 $deleteButton->click();
390 390
                 sleep(2);
391 391
                 $deleteButton->click();
392 392
             }
393 393
             $this->waitForAjax();
394 394
         } catch (NoSuchElementException $e) {
395
-            echo('Not found row with text=' . $text . ' on this page in clickDeleteButtonOnRowWithText'. PHP_EOL);
395
+            echo('Not found row with text='.$text.' on this page in clickDeleteButtonOnRowWithText'.PHP_EOL);
396 396
         } catch (Exception $e) {
397
-            $this->fail('Unknown error ' . $e->getMessage() . PHP_EOL);
397
+            $this->fail('Unknown error '.$e->getMessage().PHP_EOL);
398 398
         }
399 399
     }
400 400
 
@@ -414,9 +414,9 @@  discard block
 block discarded – undo
414 414
             $button_AddNew->click();
415 415
             $this->waitForAjax();
416 416
         } catch (NoSuchElementException $e) {
417
-            $this->fail('Not found button with href=' . $href . ' on this page on clickButtonByHref' . PHP_EOL);
417
+            $this->fail('Not found button with href='.$href.' on this page on clickButtonByHref'.PHP_EOL);
418 418
         } catch (Exception $e) {
419
-            $this->fail('Unknown error ' . $e->getMessage() . PHP_EOL);
419
+            $this->fail('Unknown error '.$e->getMessage().PHP_EOL);
420 420
         }
421 421
     }
422 422
 
@@ -435,9 +435,9 @@  discard block
 block discarded – undo
435 435
             $actions->perform();
436 436
             $tab->click();
437 437
         } catch (NoSuchElementException $e) {
438
-            $this->fail('Not found tab with anchor=' . $anchor . ' on this page in changeTabOnCurrentPage' . PHP_EOL);
438
+            $this->fail('Not found tab with anchor='.$anchor.' on this page in changeTabOnCurrentPage'.PHP_EOL);
439 439
         } catch (Exception $e) {
440
-            $this->fail('Unknown error ' . $e->getMessage() . PHP_EOL);
440
+            $this->fail('Unknown error '.$e->getMessage().PHP_EOL);
441 441
         }
442 442
     }
443 443
 
@@ -448,15 +448,15 @@  discard block
 block discarded – undo
448 448
     {
449 449
         try {
450 450
             $xpath = "//div[contains(@class, 'ui') and contains(@class, 'accordion')]";
451
-            $accordion   = self::$driver->findElement(WebDriverBy::xpath($xpath));
451
+            $accordion = self::$driver->findElement(WebDriverBy::xpath($xpath));
452 452
             $actions = new WebDriverActions(self::$driver);
453 453
             $actions->moveToElement($accordion);
454 454
             $actions->perform();
455 455
             $accordion->click();
456 456
         } catch (NoSuchElementException $e) {
457
-            $this->fail('Not found usual accordion element on this page on openAccordionOnThePage' . PHP_EOL);
457
+            $this->fail('Not found usual accordion element on this page on openAccordionOnThePage'.PHP_EOL);
458 458
         } catch (Exception $e) {
459
-            $this->fail('Unknown error ' . $e->getMessage() .' on openAccordionOnThePage'. PHP_EOL);
459
+            $this->fail('Unknown error '.$e->getMessage().' on openAccordionOnThePage'.PHP_EOL);
460 460
         }
461 461
     }
462 462
 
@@ -470,11 +470,11 @@  discard block
 block discarded – undo
470 470
         try {
471 471
             $xpath = '//input[@name="id" and (@type="hidden")]';
472 472
             $input = self::$driver->findElement(WebDriverBy::xpath($xpath));
473
-            return $input->getAttribute('value')??'';
473
+            return $input->getAttribute('value') ?? '';
474 474
         } catch (NoSuchElementException $e) {
475
-            $this->fail('Not found input with name ID on this page getCurrentRecordID' . PHP_EOL);
475
+            $this->fail('Not found input with name ID on this page getCurrentRecordID'.PHP_EOL);
476 476
         } catch (Exception $e) {
477
-            $this->fail('Unknown error ' . $e->getMessage() . PHP_EOL);
477
+            $this->fail('Unknown error '.$e->getMessage().PHP_EOL);
478 478
         }
479 479
         return '';
480 480
     }
@@ -488,7 +488,7 @@  discard block
 block discarded – undo
488 488
      */
489 489
     protected function deleteAllRecordsOnTable(string $tableId): void
490 490
     {
491
-        $xpath         = '//table[@id="' . $tableId . '"]//a[contains(@href,"delete")]';
491
+        $xpath         = '//table[@id="'.$tableId.'"]//a[contains(@href,"delete")]';
492 492
         $deleteButtons = self::$driver->findElements(WebDriverBy::xpath($xpath));
493 493
         while (count($deleteButtons) > 0) {
494 494
             try {
Please login to merge, or discard this patch.