File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -84,7 +84,7 @@ public static function tearDownAfterClass()
84
84
self ::$ baseUri = null ;
85
85
}
86
86
87
- protected static function startWebServer (?string $ webServerDir = null ): void
87
+ protected static function startWebServer (?string $ webServerDir = null , string $ hostname = ' 127.0.0.1 ' , int $ port = 9000 ): void
88
88
{
89
89
if (null !== static ::$ webServerManager ) {
90
90
return ;
@@ -95,15 +95,15 @@ protected static function startWebServer(?string $webServerDir = null): void
95
95
$ webServerDir = static ::$ webServerDir ?? $ _ENV ['PANTHERE_WEB_SERVER_DIR ' ] ?? __DIR__ .'/../../../../public ' ;
96
96
}
97
97
98
- self ::$ webServerManager = new WebServerManager ($ webServerDir , ' 127.0.0.1 ' , 9000 );
98
+ self ::$ webServerManager = new WebServerManager ($ webServerDir , $ hostname , $ port );
99
99
self ::$ webServerManager ->start ();
100
100
101
- self ::$ baseUri = ' http://127.0.0.1:9000 ' ;
101
+ self ::$ baseUri = " http:// $ hostname : $ port " ;
102
102
}
103
103
104
- protected static function createPanthereClient (): PanthereClient
104
+ protected static function createPanthereClient (string $ hostname = ' 127.0.0.1 ' , int $ port = 9000 ): PanthereClient
105
105
{
106
- self ::startWebServer ();
106
+ self ::startWebServer (null , $ hostname , $ port );
107
107
if (null === self ::$ panthereClient ) {
108
108
self ::$ panthereClient = Client::createChromeClient ();
109
109
}
You can’t perform that action at this time.
0 commit comments