Lint PHP code psr-12, add GH action

This commit is contained in:
Julien Nahum
2024-02-23 11:54:12 +01:00
parent e85e4df7fe
commit 62971a2ef4
226 changed files with 2338 additions and 2144 deletions

View File

@@ -12,22 +12,24 @@ use Laravel\Dusk\TestCase as BaseTestCase;
Browser::macro('assertPageIs', function ($page) {
if (! $page instanceof Page) {
$page = new $page;
$page = new $page();
}
// waiting for location before asserting, because window.location.pathname may be updated asynchronously
return $this->waitForLocation($page->url())->assertPathIs($page->url());
});
abstract class DuskTestCase extends BaseTestCase
{
use DatabaseMigrations;
use CreatesApplication;
use DatabaseMigrations;
use TestHelpers;
/**
* Prepare for Dusk test execution.
*
* @beforeClass
*
* @return void
*/
public static function prepare()
@@ -42,15 +44,17 @@ abstract class DuskTestCase extends BaseTestCase
*/
protected function driver()
{
$options = (new ChromeOptions)->addArguments([
$options = (new ChromeOptions())->addArguments([
'--disable-gpu',
'--headless',
'--window-size=1920,1080',
]);
return RemoteWebDriver::create(
'http://localhost:9515', DesiredCapabilities::chrome()->setCapability(
ChromeOptions::CAPABILITY, $options
'http://localhost:9515',
DesiredCapabilities::chrome()->setCapability(
ChromeOptions::CAPABILITY,
$options
)
);
}