diff --git a/tests/EngineTestCase.php b/tests/Core/EngineTest.php similarity index 98% rename from tests/EngineTestCase.php rename to tests/Core/EngineTest.php index 36997af..1b18957 100644 --- a/tests/EngineTestCase.php +++ b/tests/Core/EngineTest.php @@ -11,7 +11,7 @@ * @see https://github.com/roach-php/roach */ -namespace RoachPHP\Tests; +namespace RoachPHP\Tests\Core; use RoachPHP\Core\Engine; use RoachPHP\Core\Run; @@ -33,6 +33,7 @@ use RoachPHP\Support\Configurable; use RoachPHP\Testing\Concerns\InteractsWithRequestsAndResponses; use RoachPHP\Testing\FakeLogger; +use RoachPHP\Tests\IntegrationTestCase; use Symfony\Component\EventDispatcher\EventDispatcher; /** @@ -40,7 +41,7 @@ * * @group integration */ -final class EngineTestCase extends IntegrationTestCase +final class EngineTest extends IntegrationTestCase { use InteractsWithRequestsAndResponses; diff --git a/tests/Downloader/Middleware/ExecuteJavascriptMiddlewareTestCase.php b/tests/Downloader/Middleware/ExecuteJavascriptMiddlewareTest.php similarity index 97% rename from tests/Downloader/Middleware/ExecuteJavascriptMiddlewareTestCase.php rename to tests/Downloader/Middleware/ExecuteJavascriptMiddlewareTest.php index 77c8205..7c8a1e5 100644 --- a/tests/Downloader/Middleware/ExecuteJavascriptMiddlewareTestCase.php +++ b/tests/Downloader/Middleware/ExecuteJavascriptMiddlewareTest.php @@ -23,7 +23,7 @@ /** * @internal */ -final class ExecuteJavascriptMiddlewareTestCase extends IntegrationTestCase +final class ExecuteJavascriptMiddlewareTest extends IntegrationTestCase { use InteractsWithRequestsAndResponses; diff --git a/tests/Downloader/Middleware/RobotsTxtMiddlewareTestCase.php b/tests/Downloader/Middleware/RobotsTxtMiddlewareTest.php similarity index 97% rename from tests/Downloader/Middleware/RobotsTxtMiddlewareTestCase.php rename to tests/Downloader/Middleware/RobotsTxtMiddlewareTest.php index b7bd60f..366089b 100644 --- a/tests/Downloader/Middleware/RobotsTxtMiddlewareTestCase.php +++ b/tests/Downloader/Middleware/RobotsTxtMiddlewareTest.php @@ -33,7 +33,7 @@ /** * @internal */ -final class RobotsTxtMiddlewareTestCase extends IntegrationTestCase +final class RobotsTxtMiddlewareTest extends IntegrationTestCase { use InteractsWithRequestsAndResponses; diff --git a/tests/IntegrationTestCase.php b/tests/IntegrationTestCase.php index 6b22ee4..7208e4c 100644 --- a/tests/IntegrationTestCase.php +++ b/tests/IntegrationTestCase.php @@ -37,7 +37,9 @@ protected function setUp(): void protected function skipIfServerNotRunning(): void { try { - \file_get_contents("{$this->serverUrl}/ping"); + if (\file_get_contents("{$this->serverUrl}/ping") === false) { + self::markTestSkipped('Skipping integration test. Server not running.'); + } } catch (Throwable) { self::markTestSkipped('Skipping integration test. Server not running.'); }