diff options
author | Igor Scheller <igor.scheller@igorshp.de> | 2019-04-24 11:01:37 +0200 |
---|---|---|
committer | msquare <msquare@notrademark.de> | 2019-04-25 18:17:19 +0200 |
commit | 79c92da8c14de61dccc015f04c3900aac4bd4179 (patch) | |
tree | 7b4e0f51d2bd2508905fdc697b31a73810a1b5d5 /tests/Unit/Controllers/Metrics | |
parent | 7c3a0c70e8d23f47287ead148c6b8682216352c6 (diff) |
Formatting
```bash
php-cs-fixer fix --allow-risky=yes --rules=@PSR2,psr4,mb_str_functions.php_unit_construct,php_unit_ordered_covers,trailing_comma_in_multiline_array --rules='{"array_syntax": {"syntax":"short"}}' [tests/|src/]
```
Diffstat (limited to 'tests/Unit/Controllers/Metrics')
-rw-r--r-- | tests/Unit/Controllers/Metrics/ControllerTest.php | 6 | ||||
-rw-r--r-- | tests/Unit/Controllers/Metrics/MetricsEngineTest.php | 10 | ||||
-rw-r--r-- | tests/Unit/Controllers/Metrics/StatsTest.php | 6 |
3 files changed, 11 insertions, 11 deletions
diff --git a/tests/Unit/Controllers/Metrics/ControllerTest.php b/tests/Unit/Controllers/Metrics/ControllerTest.php index 56415e23..381e00f2 100644 --- a/tests/Unit/Controllers/Metrics/ControllerTest.php +++ b/tests/Unit/Controllers/Metrics/ControllerTest.php @@ -127,8 +127,8 @@ class ControllerTest extends TestCase } /** - * @covers \Engelsystem\Controllers\Metrics\Controller::stats * @covers \Engelsystem\Controllers\Metrics\Controller::checkAuth + * @covers \Engelsystem\Controllers\Metrics\Controller::stats */ public function testStats() { @@ -149,7 +149,7 @@ class ControllerTest extends TestCase 'user_count' => 13, 'arrived_user_count' => 10, 'done_work_hours' => 99, - 'users_in_action' => 5 + 'users_in_action' => 5, ])) ->willReturn($response); @@ -213,6 +213,6 @@ class ControllerTest extends TestCase $stats = $this->createMock(Stats::class); $config = new Config(); - return array($response, $request, $engine, $stats, $config); + return [$response, $request, $engine, $stats, $config]; } } diff --git a/tests/Unit/Controllers/Metrics/MetricsEngineTest.php b/tests/Unit/Controllers/Metrics/MetricsEngineTest.php index b810b10a..38817b36 100644 --- a/tests/Unit/Controllers/Metrics/MetricsEngineTest.php +++ b/tests/Unit/Controllers/Metrics/MetricsEngineTest.php @@ -8,12 +8,12 @@ use Engelsystem\Test\Unit\TestCase; class MetricsEngineTest extends TestCase { /** - * @covers \Engelsystem\Controllers\Metrics\MetricsEngine::get + * @covers \Engelsystem\Controllers\Metrics\MetricsEngine::escape * @covers \Engelsystem\Controllers\Metrics\MetricsEngine::formatData + * @covers \Engelsystem\Controllers\Metrics\MetricsEngine::formatValue + * @covers \Engelsystem\Controllers\Metrics\MetricsEngine::get * @covers \Engelsystem\Controllers\Metrics\MetricsEngine::renderLabels * @covers \Engelsystem\Controllers\Metrics\MetricsEngine::renderValue - * @covers \Engelsystem\Controllers\Metrics\MetricsEngine::formatValue - * @covers \Engelsystem\Controllers\Metrics\MetricsEngine::escape */ public function testGet() { @@ -30,13 +30,13 @@ class MetricsEngineTest extends TestCase $this->assertEquals( 'engelsystem_foo{lorem="ip\\\\sum"} \\"lorem\\n\\\\ipsum\\"', $engine->get('/metrics', [ - 'foo' => ['labels' => ['lorem' => 'ip\\sum'], 'value' => "\"lorem\n\\ipsum\""] + 'foo' => ['labels' => ['lorem' => 'ip\\sum'], 'value' => "\"lorem\n\\ipsum\""], ]) ); $this->assertEquals( 'engelsystem_foo_count{bar="14"} 42', - $engine->get('/metrics', ['foo_count' => ['labels' => ['bar' => 14], 'value' => 42],]) + $engine->get('/metrics', ['foo_count' => ['labels' => ['bar' => 14], 'value' => 42]]) ); $this->assertEquals( diff --git a/tests/Unit/Controllers/Metrics/StatsTest.php b/tests/Unit/Controllers/Metrics/StatsTest.php index 8dc7459e..9ecd4a66 100644 --- a/tests/Unit/Controllers/Metrics/StatsTest.php +++ b/tests/Unit/Controllers/Metrics/StatsTest.php @@ -20,9 +20,9 @@ class StatsTest extends TestCase use HasDatabase; /** - * @covers \Engelsystem\Controllers\Metrics\Stats::newUsers - * @covers \Engelsystem\Controllers\Metrics\Stats::getQuery * @covers \Engelsystem\Controllers\Metrics\Stats::__construct + * @covers \Engelsystem\Controllers\Metrics\Stats::getQuery + * @covers \Engelsystem\Controllers\Metrics\Stats::newUsers */ public function testNewUsers() { @@ -58,8 +58,8 @@ class StatsTest extends TestCase } /** - * @covers \Engelsystem\Controllers\Metrics\Stats::tshirtSizes * @covers \Engelsystem\Controllers\Metrics\Stats::raw + * @covers \Engelsystem\Controllers\Metrics\Stats::tshirtSizes */ public function testTshirtSizes() { |