@@ -177,7 +177,7 @@ |
||
| 177 | 177 | $timestamp = time(); |
| 178 | 178 | $apiToken = hash_hmac( |
| 179 | 179 | 'sha256', |
| 180 | - 'timestamp=' . $timestamp, |
|
| 180 | + 'timestamp='.$timestamp, |
|
| 181 | 181 | $this->user->getApiKey() |
| 182 | 182 | ); |
| 183 | 183 | |
@@ -85,9 +85,9 @@ |
||
| 85 | 85 | { |
| 86 | 86 | if ($this->webDriver !== null) { |
| 87 | 87 | if (in_array($this->getStatus(), [\PHPUnit_Runner_BaseTestRunner::STATUS_FAILURE, \PHPUnit_Runner_BaseTestRunner::STATUS_ERROR])) { |
| 88 | - echo PHP_EOL . PHP_EOL . PHP_EOL; |
|
| 89 | - echo 'data:image/png;base64,' . base64_encode($this->webDriver->takeScreenshot()); |
|
| 90 | - echo PHP_EOL . PHP_EOL . PHP_EOL; |
|
| 88 | + echo PHP_EOL.PHP_EOL.PHP_EOL; |
|
| 89 | + echo 'data:image/png;base64,'.base64_encode($this->webDriver->takeScreenshot()); |
|
| 90 | + echo PHP_EOL.PHP_EOL.PHP_EOL; |
|
| 91 | 91 | } |
| 92 | 92 | } |
| 93 | 93 | |
@@ -39,7 +39,7 @@ |
||
| 39 | 39 | private function sendEmail(TestResult $result, array $users) |
| 40 | 40 | { |
| 41 | 41 | $message = \Swift_Message::newInstance() |
| 42 | - ->setSubject($result->getTest()->getName() . ' ' . $result->getStatus()) |
|
| 42 | + ->setSubject($result->getTest()->getName().' '.$result->getStatus()) |
|
| 43 | 43 | ->setFrom($this->config['report_from']) |
| 44 | 44 | ->setTo($users) |
| 45 | 45 | ->setBody( |
@@ -22,10 +22,10 @@ |
||
| 22 | 22 | $configuration = $this->processConfiguration(new Configuration(), $configs); |
| 23 | 23 | |
| 24 | 24 | foreach ($configuration as $service => $config) { |
| 25 | - $container->setParameter('overwatch_service.' . $service, $config); |
|
| 25 | + $container->setParameter('overwatch_service.'.$service, $config); |
|
| 26 | 26 | } |
| 27 | 27 | |
| 28 | - $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config')); |
|
| 28 | + $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); |
|
| 29 | 29 | $loader->load('services.yml'); |
| 30 | 30 | } |
| 31 | 31 | } |
@@ -40,7 +40,7 @@ |
||
| 40 | 40 | |
| 41 | 41 | $message = $this->mailerSpy->getInvocations()[0]->parameters[0]; |
| 42 | 42 | $this->assertEquals( |
| 43 | - $result->getTest()->getName() . ' ' . $result->getStatus(), |
|
| 43 | + $result->getTest()->getName().' '.$result->getStatus(), |
|
| 44 | 44 | $message->getSubject() |
| 45 | 45 | ); |
| 46 | 46 | |
@@ -52,7 +52,7 @@ |
||
| 52 | 52 | |
| 53 | 53 | $message = $this->messageSpy->getInvocations()[0]->parameters[2]; |
| 54 | 54 | $this->assertEquals( |
| 55 | - $result->getTest()->getName() . ' ' . $result->getStatus() . ': Me gusta success kid upvoting Obama first world problems.' . PHP_EOL, |
|
| 55 | + $result->getTest()->getName().' '.$result->getStatus().': Me gusta success kid upvoting Obama first world problems.'.PHP_EOL, |
|
| 56 | 56 | $message |
| 57 | 57 | ); |
| 58 | 58 | |
@@ -20,8 +20,8 @@ discard block |
||
| 20 | 20 | $this->fs = new Filesystem(); |
| 21 | 21 | } |
| 22 | 22 | |
| 23 | - $this->docDir = __DIR__ . '/../../../../app/Resources/docs/result-reporters'; |
|
| 24 | - $this->reporterDir = __DIR__ . '/../../Reporter'; |
|
| 23 | + $this->docDir = __DIR__.'/../../../../app/Resources/docs/result-reporters'; |
|
| 24 | + $this->reporterDir = __DIR__.'/../../Reporter'; |
|
| 25 | 25 | } |
| 26 | 26 | |
| 27 | 27 | public function testExpectationsDocumented() |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | |
| 35 | 35 | public function testExpectationDocsLinked() |
| 36 | 36 | { |
| 37 | - $indexMd = file_get_contents($this->docDir . '/../index.md'); |
|
| 37 | + $indexMd = file_get_contents($this->docDir.'/../index.md'); |
|
| 38 | 38 | $reporters = explode("\n", strstr(strstr($indexMd, '##Overwatch REST API', true), '##Getting test results')); |
| 39 | 39 | $countReportersInIndex = 0; |
| 40 | 40 | |
@@ -47,8 +47,8 @@ discard block |
||
| 47 | 47 | preg_match('/^- \[[A-Z]+\]\(result-reporters(\/[A-Z_]+\.md)\)/i', $reporter, $matches); |
| 48 | 48 | |
| 49 | 49 | $this->assertTrue(( |
| 50 | - file_exists(realpath($this->docDir . $matches[1])) && |
|
| 51 | - !is_dir(realpath($this->docDir . $matches[1])) |
|
| 50 | + file_exists(realpath($this->docDir.$matches[1])) && |
|
| 51 | + !is_dir(realpath($this->docDir.$matches[1])) |
|
| 52 | 52 | )); |
| 53 | 53 | |
| 54 | 54 | $countReportersInIndex++; |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | $expectation = $this->createExpectationWithMockedResponse(); |
| 34 | 34 | |
| 35 | 35 | $this->assertEquals( |
| 36 | - 'Found the text "' . self::NEEDLE . '" on ' . self::URL, |
|
| 36 | + 'Found the text "'.self::NEEDLE.'" on '.self::URL, |
|
| 37 | 37 | $expectation->run(self::URL, self::NEEDLE) |
| 38 | 38 | ); |
| 39 | 39 | } |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | $expectation = $this->createExpectationWithMockedResponse(); |
| 55 | 55 | |
| 56 | 56 | $this->assertEquals( |
| 57 | - 'Found the text "' . self::NEEDLE_REGEX . '" on ' . self::URL, |
|
| 57 | + 'Found the text "'.self::NEEDLE_REGEX.'" on '.self::URL, |
|
| 58 | 58 | $expectation->run(self::URL, self::NEEDLE_REGEX) |
| 59 | 59 | ); |
| 60 | 60 | } |
@@ -73,12 +73,12 @@ discard block |
||
| 73 | 73 | public function testHtmlBasicStringMatching() |
| 74 | 74 | { |
| 75 | 75 | $expectation = $this->createExpectationWithMockedResponse( |
| 76 | - '<!DOCTYPE html><html><body><h1>Memes</h1><p>' . self::HAYSTACK . '</p></body></html>', |
|
| 76 | + '<!DOCTYPE html><html><body><h1>Memes</h1><p>'.self::HAYSTACK.'</p></body></html>', |
|
| 77 | 77 | 'text/html' |
| 78 | 78 | ); |
| 79 | 79 | |
| 80 | 80 | $this->assertEquals( |
| 81 | - 'Found the text "' . self::NEEDLE . '" on ' . self::URL, |
|
| 81 | + 'Found the text "'.self::NEEDLE.'" on '.self::URL, |
|
| 82 | 82 | $expectation->run(self::URL, self::NEEDLE) |
| 83 | 83 | ); |
| 84 | 84 | } |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | public function testFailedHtmlBasicMatch() |
| 91 | 91 | { |
| 92 | 92 | $expectation = $this->createExpectationWithMockedResponse( |
| 93 | - '<!DOCTYPE html><html><body><h1>Memes</h1><p>' . self::HAYSTACK . '</p></body></html>', |
|
| 93 | + '<!DOCTYPE html><html><body><h1>Memes</h1><p>'.self::HAYSTACK.'</p></body></html>', |
|
| 94 | 94 | 'text/html' |
| 95 | 95 | ); |
| 96 | 96 | |
@@ -100,14 +100,14 @@ discard block |
||
| 100 | 100 | public function testHtmlErrorRegexMatching() |
| 101 | 101 | { |
| 102 | 102 | $expectation = $this->createExpectationWithMockedResponse( |
| 103 | - '<!DOCTYPE html><html><body><h1>Memes</h1><p>' . self::HAYSTACK . '</p></body></html>', |
|
| 103 | + '<!DOCTYPE html><html><body><h1>Memes</h1><p>'.self::HAYSTACK.'</p></body></html>', |
|
| 104 | 104 | 'text/html', |
| 105 | 105 | 500, |
| 106 | 106 | true |
| 107 | 107 | ); |
| 108 | 108 | |
| 109 | 109 | $this->assertEquals( |
| 110 | - 'Found the text "' . self::NEEDLE_REGEX . '" on ' . self::URL, |
|
| 110 | + 'Found the text "'.self::NEEDLE_REGEX.'" on '.self::URL, |
|
| 111 | 111 | $expectation->run(self::URL, self::NEEDLE_REGEX) |
| 112 | 112 | ); |
| 113 | 113 | } |
@@ -119,7 +119,7 @@ discard block |
||
| 119 | 119 | public function testHttpErrorWhenNotAllowed() |
| 120 | 120 | { |
| 121 | 121 | $expectation = $this->createExpectationWithMockedResponse( |
| 122 | - '<!DOCTYPE html><html><body><h1>Memes</h1><p>' . self::HAYSTACK . '</p></body></html>', |
|
| 122 | + '<!DOCTYPE html><html><body><h1>Memes</h1><p>'.self::HAYSTACK.'</p></body></html>', |
|
| 123 | 123 | 'text/html', |
| 124 | 124 | 500 |
| 125 | 125 | ); |
@@ -20,8 +20,8 @@ discard block |
||
| 20 | 20 | $this->fs = new Filesystem(); |
| 21 | 21 | } |
| 22 | 22 | |
| 23 | - $this->docDir = __DIR__ . '/../../../../app/Resources/docs/expectations'; |
|
| 24 | - $this->expectationDir = __DIR__ . '/../../Expectation'; |
|
| 23 | + $this->docDir = __DIR__.'/../../../../app/Resources/docs/expectations'; |
|
| 24 | + $this->expectationDir = __DIR__.'/../../Expectation'; |
|
| 25 | 25 | } |
| 26 | 26 | |
| 27 | 27 | public function testExpectationsDocumented() |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | |
| 35 | 35 | public function testExpectationDocsLinked() |
| 36 | 36 | { |
| 37 | - $indexMd = file_get_contents($this->docDir . '/../index.md'); |
|
| 37 | + $indexMd = file_get_contents($this->docDir.'/../index.md'); |
|
| 38 | 38 | $expectations = explode("\n", strstr(strstr($indexMd, '##Getting test results', true), '##Expectations')); |
| 39 | 39 | $countExpectationsInIndex = 0; |
| 40 | 40 | |
@@ -47,8 +47,8 @@ discard block |
||
| 47 | 47 | preg_match('/^- \[[A-Z]+\]\(expectations(\/[A-Z_]+\.md)\)/i', $expectation, $matches); |
| 48 | 48 | |
| 49 | 49 | $this->assertTrue(( |
| 50 | - file_exists(realpath($this->docDir . $matches[1])) && |
|
| 51 | - !is_dir(realpath($this->docDir . $matches[1])) |
|
| 50 | + file_exists(realpath($this->docDir.$matches[1])) && |
|
| 51 | + !is_dir(realpath($this->docDir.$matches[1])) |
|
| 52 | 52 | )); |
| 53 | 53 | |
| 54 | 54 | $countExpectationsInIndex++; |