Skip to content

Commit a38768f

Browse files
committed
wip
1 parent b9f72fa commit a38768f

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

tests/Browser/BrowserTestCase.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,21 @@
33
namespace Tests\Browser;
44

55
use Symfony\Component\Panther\PantherTestCase;
6+
use Zenstruck\Browser\PantherBrowser;
67
use Zenstruck\Browser\Test\HasBrowser;
78

89
abstract 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)

tests/Browser/PluginSettingsTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)