Skip to content

Commit

Permalink
fix: rename integration tests so they actually get run
Browse files Browse the repository at this point in the history
  • Loading branch information
ksassnowski committed Mar 27, 2023
1 parent 96c9332 commit af069cd
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
5 changes: 3 additions & 2 deletions tests/EngineTestCase.php → tests/Core/EngineTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -33,14 +33,15 @@
use RoachPHP\Support\Configurable;
use RoachPHP\Testing\Concerns\InteractsWithRequestsAndResponses;
use RoachPHP\Testing\FakeLogger;
use RoachPHP\Tests\IntegrationTestCase;
use Symfony\Component\EventDispatcher\EventDispatcher;

/**
* @internal
*
* @group integration
*/
final class EngineTestCase extends IntegrationTestCase
final class EngineTest extends IntegrationTestCase
{
use InteractsWithRequestsAndResponses;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
/**
* @internal
*/
final class ExecuteJavascriptMiddlewareTestCase extends IntegrationTestCase
final class ExecuteJavascriptMiddlewareTest extends IntegrationTestCase
{
use InteractsWithRequestsAndResponses;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
/**
* @internal
*/
final class RobotsTxtMiddlewareTestCase extends IntegrationTestCase
final class RobotsTxtMiddlewareTest extends IntegrationTestCase
{
use InteractsWithRequestsAndResponses;

Expand Down
4 changes: 3 additions & 1 deletion tests/IntegrationTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.');
}
Expand Down

0 comments on commit af069cd

Please sign in to comment.