File tree Expand file tree Collapse file tree 5 files changed +10
-8
lines changed Expand file tree Collapse file tree 5 files changed +10
-8
lines changed Original file line number Diff line number Diff line change 51
51
- name : Start server
52
52
run : (php -S localhost:8000 -t ./tests/Server &) || /bin/true
53
53
54
+ - name : Wait for server bootup
55
+ run : sleep 3
56
+
54
57
- name : Execute tests
55
58
run : vendor/bin/phpunit
Original file line number Diff line number Diff line change 11
11
* @see https://github.com/roach-php/roach
12
12
*/
13
13
14
- namespace RoachPHP \Tests ;
14
+ namespace RoachPHP \Tests \ Core ;
15
15
16
16
use RoachPHP \Core \Engine ;
17
17
use RoachPHP \Core \Run ;
33
33
use RoachPHP \Support \Configurable ;
34
34
use RoachPHP \Testing \Concerns \InteractsWithRequestsAndResponses ;
35
35
use RoachPHP \Testing \FakeLogger ;
36
+ use RoachPHP \Tests \IntegrationTestCase ;
36
37
use Symfony \Component \EventDispatcher \EventDispatcher ;
37
38
38
39
/**
39
40
* @internal
40
41
*
41
42
* @group integration
42
43
*/
43
- final class EngineTestCase extends IntegrationTestCase
44
+ final class EngineTest extends IntegrationTestCase
44
45
{
45
46
use InteractsWithRequestsAndResponses;
46
47
Original file line number Diff line number Diff line change 23
23
/**
24
24
* @internal
25
25
*/
26
- final class ExecuteJavascriptMiddlewareTestCase extends IntegrationTestCase
26
+ final class ExecuteJavascriptMiddlewareTest extends IntegrationTestCase
27
27
{
28
28
use InteractsWithRequestsAndResponses;
29
29
Original file line number Diff line number Diff line change 33
33
/**
34
34
* @internal
35
35
*/
36
- final class RobotsTxtMiddlewareTestCase extends IntegrationTestCase
36
+ final class RobotsTxtMiddlewareTest extends IntegrationTestCase
37
37
{
38
38
use InteractsWithRequestsAndResponses;
39
39
Original file line number Diff line number Diff line change @@ -29,16 +29,14 @@ protected function setUp(): void
29
29
$ this ->skipIfServerNotRunning ();
30
30
31
31
try {
32
- \unlink (__DIR__ . '/Server/tmp/crawled.json ' );
32
+ @ \unlink (__DIR__ . '/Server/tmp/crawled.json ' );
33
33
} catch (Throwable ) {
34
34
}
35
35
}
36
36
37
37
protected function skipIfServerNotRunning (): void
38
38
{
39
- try {
40
- \file_get_contents ("{$ this ->serverUrl }/ping " );
41
- } catch (Throwable ) {
39
+ if (false === @\file_get_contents ("{$ this ->serverUrl }/ping " )) {
42
40
self ::markTestSkipped ('Skipping integration test. Server not running. ' );
43
41
}
44
42
}
You can’t perform that action at this time.
0 commit comments