File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change 33namespace Tests \Browser ;
44
55use Symfony \Component \Panther \PantherTestCase ;
6+ use Zenstruck \Browser \PantherBrowser ;
67use Zenstruck \Browser \Test \HasBrowser ;
78
89abstract class BrowserTestCase extends PantherTestCase
910{
1011 use HasBrowser;
1112
13+ protected function myBrowser (): PantherBrowser
14+ {
15+ return $ this ->pantherBrowser (['external_base_uri ' => 'http://localhost:8100 ' ]);
16+ }
17+
1218 protected function asUser ($ login , $ password )
1319 {
14- return $ this ->pantherBrowser ()
20+ return $ this ->myBrowser ()
1521 ->visit ('http://localhost:8100/wp-admin ' )
1622 ->fillField ('user_login ' , $ login )
1723 ->fillField ('user_pass ' , $ password )
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ public function test_activation_and_presence_of_default_scripts(): void
1313 ->assertContains ('<!-- Simple Analytics: Not logging requests from admins --> ' )
1414 ->assertContains ('<script src="http://localhost:8100/wp-content/plugins/simpleanalytics/resources/js/inactive.js" ' );
1515
16- $ this ->pantherBrowser ()
16+ $ this ->myBrowser ()
1717 ->visit ('http://localhost:8100 ' )
1818 ->assertContains ('<script src="https://scripts.simpleanalyticscdn.com/latest.js"></script> ' );
1919 }
You can’t perform that action at this time.
0 commit comments