@@ -42,7 +42,8 @@ discard block |
||
| 42 | 42 | ); |
| 43 | 43 | } |
| 44 | 44 | |
| 45 | - private function assertElementHasClass(WebDriverElement $element, $class, $has = true) { |
|
| 45 | + private function assertElementHasClass(WebDriverElement $element, $class, $has = true) |
|
| 46 | + { |
|
| 46 | 47 | $classes = $element->getAttribute('class'); |
| 47 | 48 | |
| 48 | 49 | $this->assertNotNull($classes); |
@@ -58,7 +59,8 @@ discard block |
||
| 58 | 59 | ); |
| 59 | 60 | } |
| 60 | 61 | |
| 61 | - private function assertElementNotHasClass(WebDriverElement $element, $class) { |
|
| 62 | + private function assertElementNotHasClass(WebDriverElement $element, $class) |
|
| 63 | + { |
|
| 62 | 64 | $this->assertElementHasClass($element, $class, false); |
| 63 | 65 | } |
| 64 | 66 | } |
@@ -87,13 +87,13 @@ discard block |
||
| 87 | 87 | { |
| 88 | 88 | $this->waitForLoadingAnimation(); |
| 89 | 89 | $this->webDriver->findElement( |
| 90 | - WebDriverBy::cssSelector('.tests li:nth-child(' . $number . ') .test a:nth-child(2)') |
|
| 90 | + WebDriverBy::cssSelector('.tests li:nth-child('.$number.') .test a:nth-child(2)') |
|
| 91 | 91 | )->click(); |
| 92 | 92 | } |
| 93 | 93 | |
| 94 | 94 | private function getResultsOnPage($selector = ' span') |
| 95 | 95 | { |
| 96 | - $selector = '.result' . $selector; |
|
| 96 | + $selector = '.result'.$selector; |
|
| 97 | 97 | |
| 98 | 98 | $results = $this->webDriver->findElements( |
| 99 | 99 | WebDriverBy::cssSelector($selector) |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | private function getActionItem($number) |
| 106 | 106 | { |
| 107 | 107 | return $this->webDriver->findElement( |
| 108 | - WebDriverBy::cssSelector('.widget-content .row a:nth-child(' . $number . ')') |
|
| 108 | + WebDriverBy::cssSelector('.widget-content .row a:nth-child('.$number.')') |
|
| 109 | 109 | ); |
| 110 | 110 | } |
| 111 | 111 | |
@@ -132,7 +132,7 @@ |
||
| 132 | 132 | private function getUsers($suffix = '') |
| 133 | 133 | { |
| 134 | 134 | return $this->webDriver->findElements( |
| 135 | - WebDriverBy::cssSelector('.users li' . $suffix) |
|
| 135 | + WebDriverBy::cssSelector('.users li'.$suffix) |
|
| 136 | 136 | ); |
| 137 | 137 | } |
| 138 | 138 | |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | |
| 79 | 79 | public function testResultAgeWarningShown() |
| 80 | 80 | { |
| 81 | - $query = "UPDATE TestResult SET created_at = '" . date('Y-m-d H:i:s', time() - (10 * 60 * 60)) . "' WHERE 1"; |
|
| 81 | + $query = "UPDATE TestResult SET created_at = '".date('Y-m-d H:i:s', time() - (10 * 60 * 60))."' WHERE 1"; |
|
| 82 | 82 | $sql = $this->em->getConnection()->prepare($query); |
| 83 | 83 | $sql->execute(); |
| 84 | 84 | |
@@ -228,7 +228,7 @@ discard block |
||
| 228 | 228 | { |
| 229 | 229 | //If passed a fixture, construct expected value |
| 230 | 230 | if ($test instanceof \Overwatch\TestBundle\Entity\Test) { |
| 231 | - return 'Expect ' . $test->getActual() . ' ' . $test->getExpectation() . ' ' . $test->getExpected(); |
|
| 231 | + return 'Expect '.$test->getActual().' '.$test->getExpectation().' '.$test->getExpected(); |
|
| 232 | 232 | } |
| 233 | 233 | |
| 234 | 234 | //Else, find text |
@@ -241,7 +241,7 @@ discard block |
||
| 241 | 241 | { |
| 242 | 242 | //If passed a fixture, construct expected value |
| 243 | 243 | if ($test instanceof \Overwatch\TestBundle\Entity\Test) { |
| 244 | - return 'Expect ' . $test->getActual() . ' ' . $test->getExpectation() . ' ' . $test->getExpected(); |
|
| 244 | + return 'Expect '.$test->getActual().' '.$test->getExpectation().' '.$test->getExpected(); |
|
| 245 | 245 | } |
| 246 | 246 | |
| 247 | 247 | //Else, find actual hover text |