Skip to content

Commit

Permalink
minor: test LaminasDiagnosticsBridgeCheck
Browse files Browse the repository at this point in the history
  • Loading branch information
kbond committed Nov 21, 2023
1 parent e1732e9 commit 20eafa6
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 117 deletions.
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
},
"require-dev": {
"doctrine/doctrine-bundle": "^2.10",
"laminas/laminas-diagnostics": "^1.24",
"matthiasnoback/symfony-dependency-injection-test": "^4.3|^5.0",
"phpstan/phpstan": "^1.4",
"phpunit/phpunit": "^9.5.0",
Expand Down
101 changes: 0 additions & 101 deletions phpstan-baseline.neon

This file was deleted.

3 changes: 0 additions & 3 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
includes:
- phpstan-baseline.neon

parameters:
level: 8
treatPhpDocTypesAsCertain: false
Expand Down
8 changes: 0 additions & 8 deletions tests/Check/LaminasDiagnosticsBridgeCheckTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

namespace Liip\Monitor\Tests\Check;

use Composer\InstalledVersions;
use Laminas\Diagnostics\Check\Callback;
use Laminas\Diagnostics\Result\AbstractResult;
use Laminas\Diagnostics\Result\Failure;
Expand All @@ -30,13 +29,6 @@ final class LaminasDiagnosticsBridgeCheckTest extends TestCase
{
use CheckTests;

public static function setUpBeforeClass(): void
{
if (!InstalledVersions::isInstalled('laminas/laminas-diagnostics')) {
self::markTestSkipped('laminas/laminas-diagnostics is not installed');
}
}

public static function checkResultProvider(): iterable
{
yield [
Expand Down
10 changes: 5 additions & 5 deletions tests/LiipMonitorBundleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ public function services_are_autowired(): void
/** @var TestService $service */
$service = self::getContainer()->get(TestService::class);

$this->assertCount(19, $service->checks);
$this->assertCount(21, $service->checks);
$this->assertCount(3, $service->fooChecks);
$this->assertCount(1, $service->barChecks);
$this->assertCount(1, $service->bazChecks);
$this->assertCount(2, $service->bazChecks);

$this->assertSame($service->system, $service->linuxSystem);
}
Expand All @@ -67,13 +67,13 @@ public function execute_list_command(): void
public function execute_health_command(): void
{
$this->executeConsoleCommand('monitor:health')
->assertOutputContains('19 check executed')
->assertOutputContains('21 check executed')
->assertOutputContains('OK DBAL Connection "default"')
->assertOutputContains('OK Check Service 1: Success')
;

$this->executeConsoleCommand('monitor:health -v') // verbose
->assertOutputContains('19 check executed')
->assertOutputContains('21 check executed')
;
}

Expand All @@ -88,7 +88,7 @@ public function messenger_run_check_suite(): void
$results = $this->handle(new RunCheckSuite());

$this->assertInstanceOf(ResultSet::class, $results);
$this->assertCount(19, $results);
$this->assertCount(21, $results);
}

/**
Expand Down

0 comments on commit 20eafa6

Please sign in to comment.