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 cce5cf5
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 266 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,8 @@ jobs:
- name: Start server
run: (php -S localhost:8000 -t ./tests/Server &) || /bin/true

- name: Wait for server bootup
run: sleep 3

- name: Execute tests
run: vendor/bin/phpunit
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
260 changes: 0 additions & 260 deletions tests/EngineTestCase.php

This file was deleted.

6 changes: 2 additions & 4 deletions tests/IntegrationTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,14 @@ protected function setUp(): void
$this->skipIfServerNotRunning();

try {
\unlink(__DIR__ . '/Server/tmp/crawled.json');
@\unlink(__DIR__ . '/Server/tmp/crawled.json');
} catch (Throwable) {
}
}

protected function skipIfServerNotRunning(): void
{
try {
\file_get_contents("{$this->serverUrl}/ping");
} catch (Throwable) {
if (false === @\file_get_contents("{$this->serverUrl}/ping")) {
self::markTestSkipped('Skipping integration test. Server not running.');
}
}
Expand Down

0 comments on commit cce5cf5

Please sign in to comment.