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 5151 - name : Start server
5252 run : (php -S localhost:8000 -t ./tests/Server &) || /bin/true
5353
54+ - name : Wait for server bootup
55+ run : sleep 3
56+
5457 - name : Execute tests
5558 run : vendor/bin/phpunit
Original file line number Diff line number Diff line change 1111 * @see https://github.com/roach-php/roach
1212 */
1313
14- namespace RoachPHP \Tests ;
14+ namespace RoachPHP \Tests \ Core ;
1515
1616use RoachPHP \Core \Engine ;
1717use RoachPHP \Core \Run ;
3333use RoachPHP \Support \Configurable ;
3434use RoachPHP \Testing \Concerns \InteractsWithRequestsAndResponses ;
3535use RoachPHP \Testing \FakeLogger ;
36+ use RoachPHP \Tests \IntegrationTestCase ;
3637use Symfony \Component \EventDispatcher \EventDispatcher ;
3738
3839/**
3940 * @internal
4041 *
4142 * @group integration
4243 */
43- final class EngineTestCase extends IntegrationTestCase
44+ final class EngineTest extends IntegrationTestCase
4445{
4546 use InteractsWithRequestsAndResponses;
4647
Original file line number Diff line number Diff line change 2323/**
2424 * @internal
2525 */
26- final class ExecuteJavascriptMiddlewareTestCase extends IntegrationTestCase
26+ final class ExecuteJavascriptMiddlewareTest extends IntegrationTestCase
2727{
2828 use InteractsWithRequestsAndResponses;
2929
Original file line number Diff line number Diff line change 3333/**
3434 * @internal
3535 */
36- final class RobotsTxtMiddlewareTestCase extends IntegrationTestCase
36+ final class RobotsTxtMiddlewareTest extends IntegrationTestCase
3737{
3838 use InteractsWithRequestsAndResponses;
3939
Original file line number Diff line number Diff line change @@ -29,16 +29,14 @@ protected function setUp(): void
2929 $ this ->skipIfServerNotRunning ();
3030
3131 try {
32- \unlink (__DIR__ . '/Server/tmp/crawled.json ' );
32+ @ \unlink (__DIR__ . '/Server/tmp/crawled.json ' );
3333 } catch (Throwable ) {
3434 }
3535 }
3636
3737 protected function skipIfServerNotRunning (): void
3838 {
39- try {
40- \file_get_contents ("{$ this ->serverUrl }/ping " );
41- } catch (Throwable ) {
39+ if (false === @\file_get_contents ("{$ this ->serverUrl }/ping " )) {
4240 self ::markTestSkipped ('Skipping integration test. Server not running. ' );
4341 }
4442 }
You can’t perform that action at this time.
0 commit comments