@@ -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++; |
@@ -36,13 +36,13 @@ |
||
36 | 36 | socket_close($socket); |
37 | 37 | |
38 | 38 | if ($rtt > $this->config['unsatisfactory']) { |
39 | - throw new Result\ExpectationUnsatisfactoryException("$actual responded in $rtt s, above the unsatisfactory threshold (" . $this->config['unsatisfactory'] . ' s)'); |
|
39 | + throw new Result\ExpectationUnsatisfactoryException("$actual responded in $rtt s, above the unsatisfactory threshold (".$this->config['unsatisfactory'].' s)'); |
|
40 | 40 | } |
41 | 41 | |
42 | - return 'Pinged in ' . $rtt . 's'; |
|
42 | + return 'Pinged in '.$rtt.'s'; |
|
43 | 43 | } |
44 | 44 | |
45 | 45 | socket_close($socket); |
46 | - throw new Result\ExpectationFailedException("$actual failed to respond in the timeout threshold (" . $this->config['timeout'] . ' s)'); |
|
46 | + throw new Result\ExpectationFailedException("$actual failed to respond in the timeout threshold (".$this->config['timeout'].' s)'); |
|
47 | 47 | } |
48 | 48 | } |
@@ -35,7 +35,7 @@ |
||
35 | 35 | try { |
36 | 36 | $reporter->notify($result); |
37 | 37 | } catch (\Exception $ex) { |
38 | - $this->logger->error('An error occurred whilst calling ResultReporter ' . \get_class($reporter) . ':' . $ex); |
|
38 | + $this->logger->error('An error occurred whilst calling ResultReporter '.\get_class($reporter).':'.$ex); |
|
39 | 39 | } |
40 | 40 | } |
41 | 41 | } |
@@ -28,7 +28,7 @@ |
||
28 | 28 | public static function isValid($status) |
29 | 29 | { |
30 | 30 | if (!in_array($status, self::getAll())) { |
31 | - throw new \InvalidArgumentException($status . ' is not a valid TestResult status'); |
|
31 | + throw new \InvalidArgumentException($status.' is not a valid TestResult status'); |
|
32 | 32 | } |
33 | 33 | } |
34 | 34 | } |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | public function testGetRecentGroupResults() |
38 | 38 | { |
39 | 39 | $this->logIn('ROLE_SUPER_ADMIN'); |
40 | - $this->client->request('GET', '/api/results/group/' . TestGroupFixtures::$groups['group-1']->getId()); |
|
40 | + $this->client->request('GET', '/api/results/group/'.TestGroupFixtures::$groups['group-1']->getId()); |
|
41 | 41 | |
42 | 42 | $this->assertJsonResponse($this->client->getResponse()); |
43 | 43 | $this->assertCount(2, $this->getResponseContent()); |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | public function testGetRecentGroupResultsInsufficentPerms() |
49 | 49 | { |
50 | 50 | $this->logIn('ROLE_ADMIN'); |
51 | - $this->client->request('GET', '/api/results/group/' . TestGroupFixtures::$groups['group-1']->getId()); |
|
51 | + $this->client->request('GET', '/api/results/group/'.TestGroupFixtures::$groups['group-1']->getId()); |
|
52 | 52 | |
53 | 53 | $this->assertForbidden($this->client->getResponse()); |
54 | 54 | } |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | public function testGetResultsForTest() |
57 | 57 | { |
58 | 58 | $this->logIn('ROLE_SUPER_ADMIN'); |
59 | - $this->client->request('GET', '/api/results/test/' . TestFixtures::$tests['test-1']->getId()); |
|
59 | + $this->client->request('GET', '/api/results/test/'.TestFixtures::$tests['test-1']->getId()); |
|
60 | 60 | |
61 | 61 | $this->assertJsonResponse($this->client->getResponse()); |
62 | 62 | $this->assertCount(3, $this->getResponseContent()); |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | public function testGetResultsForTestInsufficentPerms() |
69 | 69 | { |
70 | 70 | $this->logIn('ROLE_ADMIN'); |
71 | - $this->client->request('GET', '/api/results/test/' . TestFixtures::$tests['test-1']->getId()); |
|
71 | + $this->client->request('GET', '/api/results/test/'.TestFixtures::$tests['test-1']->getId()); |
|
72 | 72 | |
73 | 73 | $this->assertForbidden($this->client->getResponse()); |
74 | 74 | } |
@@ -34,7 +34,7 @@ |
||
34 | 34 | $command = new ResultCleanupCommand(); |
35 | 35 | $command->setContainer($this->getContainer()); |
36 | 36 | |
37 | - $this->application = new Application('Overwatch', '0.0.1-test.' . time()); |
|
37 | + $this->application = new Application('Overwatch', '0.0.1-test.'.time()); |
|
38 | 38 | $this->application->add($command); |
39 | 39 | |
40 | 40 | $this->command = new CommandTester($command); |
@@ -12,7 +12,7 @@ |
||
12 | 12 | public function __construct($alias, $code = 0, $previous = null) |
13 | 13 | { |
14 | 14 | parent::__construct( |
15 | - 'Expectation with ' . $alias . ' could not be found.', |
|
15 | + 'Expectation with '.$alias.' could not be found.', |
|
16 | 16 | $code, |
17 | 17 | $previous |
18 | 18 | ); |
@@ -22,7 +22,7 @@ |
||
22 | 22 | { |
23 | 23 | $this->processConfiguration(new Configuration(), $configs); |
24 | 24 | |
25 | - $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config')); |
|
25 | + $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); |
|
26 | 26 | $loader->load('services.yml'); |
27 | 27 | } |
28 | 28 | } |