testing php storm code cleanup and styling

This commit is contained in:
Andras Bacsai
2023-08-08 11:51:36 +02:00
parent a8ee779b31
commit f2228cec7b
368 changed files with 23834 additions and 2623 deletions

View File

@@ -2,7 +2,6 @@
namespace Tests\Browser;
use Illuminate\Foundation\Testing\DatabaseMigrations;
use Laravel\Dusk\Browser;
use Tests\DuskTestCase;
@@ -15,7 +14,7 @@ class ExampleTest extends DuskTestCase
{
$this->browse(function (Browser $browser) {
$browser->visit('/')
->assertSee('Laravel');
->assertSee('Laravel');
});
}
}

View File

@@ -12,7 +12,7 @@ trait CreatesApplication
*/
public function createApplication(): Application
{
$app = require __DIR__.'/../bootstrap/app.php';
$app = require __DIR__ . '/../bootstrap/app.php';
$app->make(Kernel::class)->bootstrap();

View File

@@ -2,10 +2,10 @@
namespace Tests;
use Illuminate\Support\Collection;
use Facebook\WebDriver\Chrome\ChromeOptions;
use Facebook\WebDriver\Remote\DesiredCapabilities;
use Facebook\WebDriver\Remote\RemoteWebDriver;
use Illuminate\Support\Collection;
use Laravel\Dusk\TestCase as BaseTestCase;
abstract class DuskTestCase extends BaseTestCase
@@ -19,7 +19,7 @@ abstract class DuskTestCase extends BaseTestCase
*/
public static function prepare(): void
{
if (! static::runningInSail()) {
if (!static::runningInSail()) {
static::startChromeDriver();
}
}
@@ -46,9 +46,13 @@ abstract class DuskTestCase extends BaseTestCase
);
}
protected function baseUrl()
/**
* Determine if the browser window should start maximized.
*/
protected function shouldStartMaximized(): bool
{
return rtrim(config('app.url'), '/');
return isset($_SERVER['DUSK_START_MAXIMIZED']) ||
isset($_ENV['DUSK_START_MAXIMIZED']);
}
/**
@@ -57,15 +61,11 @@ abstract class DuskTestCase extends BaseTestCase
protected function hasHeadlessDisabled(): bool
{
return isset($_SERVER['DUSK_HEADLESS_DISABLED']) ||
isset($_ENV['DUSK_HEADLESS_DISABLED']);
isset($_ENV['DUSK_HEADLESS_DISABLED']);
}
/**
* Determine if the browser window should start maximized.
*/
protected function shouldStartMaximized(): bool
protected function baseUrl()
{
return isset($_SERVER['DUSK_START_MAXIMIZED']) ||
isset($_ENV['DUSK_START_MAXIMIZED']);
return rtrim(config('app.url'), '/');
}
}

View File

@@ -2,8 +2,8 @@
use App\Actions\CoolifyTask\RunRemoteProcess;
use App\Actions\CoolifyTask\TidyOutput;
use App\Models\User;
use App\Models\Server;
use App\Models\User;
use Database\Seeders\DatabaseSeeder;
use Illuminate\Foundation\Testing\DatabaseMigrations;
use Illuminate\Foundation\Testing\RefreshDatabase;
@@ -56,7 +56,7 @@ it('starts a docker container correctly', function () {
// Stop testing containers
$activity = remote_process([
"docker ps --filter='name={$coolifyNamePrefix}*' -aq && " .
"docker rm -f $(docker ps --filter='name={$coolifyNamePrefix}*' -aq)"
"docker rm -f $(docker ps --filter='name={$coolifyNamePrefix}*' -aq)"
], $host);
expect($activity->getExtraProperty('exitCode'))->toBe(0);
});

View File

@@ -13,7 +13,7 @@
uses(
Tests\TestCase::class,
// Illuminate\Foundation\Testing\RefreshDatabase::class,
// Illuminate\Foundation\Testing\RefreshDatabase::class,
)->in('Feature');
/*