From 1643c7034892c585b0bcbe309c8ff7d98dd85703 Mon Sep 17 00:00:00 2001 From: Shift Date: Mon, 17 Feb 2025 02:22:43 +0000 Subject: [PATCH 01/10] Bump dependencies for Laravel 12 --- composer.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/composer.json b/composer.json index f3a3047c..7293512f 100644 --- a/composer.json +++ b/composer.json @@ -17,14 +17,14 @@ ], "require": { "php": "^8.2|^8.3|^8.4", - "illuminate/contracts": "^10.48.23|^11.33" + "illuminate/contracts": "^10.48.23|^11.33|^12.0" }, "require-dev": { "laravel/pint": "^1.0", "nunomaduro/collision": "^7.10|^8.1", "nunomaduro/larastan": "^2.0.1", - "orchestra/testbench": "^8.0|^9.0", - "phpunit/phpunit": "^10.4" + "orchestra/testbench": "^8.0|^9.0|^10.0", + "phpunit/phpunit": "^10.4|^11.5.3" }, "suggest": { "kirschbaum-development/eloquent-power-joins": "Required to enable support sorting by (nested) relationships in Splade Tables (^3.0)", @@ -70,4 +70,4 @@ }, "minimum-stability": "dev", "prefer-stable": true -} \ No newline at end of file +} From 375f226f93e06924792503e8085e70abbf2e1d11 Mon Sep 17 00:00:00 2001 From: Shift Date: Mon, 17 Feb 2025 02:22:43 +0000 Subject: [PATCH 02/10] Update GitHub Actions for Laravel 12 --- .github/workflows/run-stub-tests.yml | 28 ++++++++++++---------- .github/workflows/run-table-tests.yml | 34 +++++++++++++++------------ .github/workflows/run-tests.yml | 20 +++++++++------- 3 files changed, 46 insertions(+), 36 deletions(-) diff --git a/.github/workflows/run-stub-tests.yml b/.github/workflows/run-stub-tests.yml index 4694e262..ad067f8f 100644 --- a/.github/workflows/run-stub-tests.yml +++ b/.github/workflows/run-stub-tests.yml @@ -1,6 +1,8 @@ name: run-stub-tests -on: [push, pull_request] +on: + - push + - pull_request jobs: stub-test: @@ -11,7 +13,7 @@ jobs: matrix: os: [ubuntu-22.04, windows-latest] php: [8.4, 8.3, 8.2] - laravel: [11.0, 10.2] + laravel: [10.2, 11.0, '12.0'] exclude: - php: 8.4 laravel: 10.0 @@ -33,17 +35,17 @@ jobs: - name: Remove installed Splade (Unix) run: rm -rf vendor/protonemedia/laravel-splade - if: matrix.os == 'ubuntu-22.04' + if: "matrix.os == 'ubuntu-22.04'" - name: Remove installed Splade (Windows) run: rd "vendor/protonemedia/laravel-splade" /s /q shell: cmd - if: matrix.os == 'windows-latest' + if: "matrix.os == 'windows-latest'" - name: Checkout code uses: actions/checkout@v4.2.2 with: - path: "vendor/protonemedia/laravel-splade" + path: vendor/protonemedia/laravel-splade - name: Install Splade run: | @@ -59,7 +61,7 @@ jobs: run: | rm -rf node_modules/@protonemedia/laravel-splade/dist cp -R vendor/protonemedia/laravel-splade/dist node_modules/@protonemedia/laravel-splade/ - if: matrix.os == 'ubuntu-22.04' + if: "matrix.os == 'ubuntu-22.04'" - name: Remove installed Splade and copy front-end build from Checkout (Windows) run: | @@ -67,39 +69,39 @@ jobs: mkdir "node_modules/@protonemedia/laravel-splade/dist" xcopy "vendor/protonemedia/laravel-splade/dist" "node_modules/@protonemedia/laravel-splade/dist" /E /I shell: cmd - if: matrix.os == 'windows-latest' + if: "matrix.os == 'windows-latest'" - name: Compile assets run: npm run build - name: Run Laravel Server (Unix) run: php artisan serve & - if: matrix.os == 'ubuntu-22.04' + if: "matrix.os == 'ubuntu-22.04'" - name: Run Test (Unix) run: php vendor/protonemedia/laravel-splade/TestStubs.php - if: matrix.os == 'ubuntu-22.04' + if: "matrix.os == 'ubuntu-22.04'" - name: Run Laravel Server (Windows) and Run Test run: | start /b cmd /v:on /c "(php artisan serve) &" php vendor/protonemedia/laravel-splade/TestStubs.php shell: cmd - if: matrix.os == 'windows-latest' + if: "matrix.os == 'windows-latest'" - name: Start SSR server (Unix) run: | echo "SPLADE_SSR_ENABLED=true" >> .env node bootstrap/ssr/ssr.js & - if: matrix.os == 'ubuntu-22.04' + if: "matrix.os == 'ubuntu-22.04'" - name: Run Test command (Unix) run: php artisan splade:ssr-test - if: matrix.os == 'ubuntu-22.04' + if: "matrix.os == 'ubuntu-22.04'" - name: Start SSR server (Windows) and Run Test command run: | echo "SPLADE_SSR_ENABLED=true" >> .env node bootstrap/ssr/ssr.js & php artisan splade:ssr-test - if: matrix.os == 'windows-latest' + if: "matrix.os == 'windows-latest'" diff --git a/.github/workflows/run-table-tests.yml b/.github/workflows/run-table-tests.yml index e5f950b7..57cc4a81 100644 --- a/.github/workflows/run-table-tests.yml +++ b/.github/workflows/run-table-tests.yml @@ -1,15 +1,18 @@ name: run-table-tests -on: [push, pull_request] +on: + - push + - pull_request jobs: table-test: runs-on: ubuntu-latest + strategy: fail-fast: true matrix: php: [8.4, 8.3, 8.2] - laravel: [11.0, 10.0] + laravel: [10.0, 11.0, '12.0'] db: [mysql, postgres, sqlite] ssr: [true, false] dependency-version: [prefer-lowest, prefer-stable] @@ -18,6 +21,8 @@ jobs: testbench: 9.* - laravel: 10.0 testbench: 8.* + - laravel: '12.0' + testbench: 10.* exclude: - dependency-version: prefer-lowest ssr: true @@ -68,7 +73,6 @@ jobs: env: cache-name: cache-node-modules with: - # npm cache files are stored in `~/.npm` on Linux/macOS path: ~/.npm key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} restore-keys: | @@ -76,12 +80,12 @@ jobs: ${{ runner.os }}-build- ${{ runner.os }}- - - if: ${{ steps.cache-npm.outputs.cache-hit == 'false' }} + - if: "${{ steps.cache-npm.outputs.cache-hit == 'false' }}" name: List the state of node modules continue-on-error: true run: npm list - - name: "Install locked dependencies with npm" + - name: Install locked dependencies with npm run: | npm ci --ignore-scripts @@ -99,19 +103,19 @@ jobs: coverage: none - name: Prepare environment file (MySQL) - if: ${{ matrix.db == 'mysql' }} + if: "${{ matrix.db == 'mysql' }}" run: | cd app cp .env.example.mysql .env - name: Prepare environment file (PostgreSQL) - if: ${{ matrix.db == 'postgres' }} + if: "${{ matrix.db == 'postgres' }}" run: | cd app cp .env.example.postgres .env - name: Prepare environment file (SQLite) - if: ${{ matrix.db == 'sqlite' }} + if: "${{ matrix.db == 'sqlite' }}" run: | cd app cp .env.example .env @@ -140,7 +144,7 @@ jobs: cd app sed -i -e "s|SPLADE_SSR_ENABLED=false|SPLADE_SSR_ENABLED=true|g" .env node bootstrap/ssr/ssr.mjs & - if: matrix.ssr == true + if: 'matrix.ssr == true' - name: Migrate DB and Run Laravel Server (MySQL) run: | @@ -148,7 +152,7 @@ jobs: php artisan storage:link php artisan migrate:fresh --seed php artisan serve & - if: ${{ matrix.db == 'mysql' }} + if: "${{ matrix.db == 'mysql' }}" env: DB_PORT: ${{ job.services.mysql.ports[3306] }} @@ -158,12 +162,12 @@ jobs: php artisan storage:link php artisan migrate:fresh --seed php artisan serve & - if: ${{ matrix.db == 'postgres' }} + if: "${{ matrix.db == 'postgres' }}" env: DB_PORT: ${{ job.services.postgres.ports[5432] }} - name: Migrate DB and Run Laravel Server (SQLite) - if: ${{ matrix.db == 'sqlite' }} + if: "${{ matrix.db == 'sqlite' }}" run: | cd app php artisan storage:link @@ -171,7 +175,7 @@ jobs: php artisan serve & - name: Execute Dusk tests (only table tests - MySQL) - if: ${{ matrix.db == 'mysql' }} + if: "${{ matrix.db == 'mysql' }}" uses: nick-invision/retry@v3 with: timeout_minutes: 10 @@ -182,7 +186,7 @@ jobs: DB_PORT: ${{ job.services.mysql.ports[3306] }} - name: Execute Dusk tests (only table tests - PostgreSQL) - if: ${{ matrix.db == 'postgres' }} + if: "${{ matrix.db == 'postgres' }}" uses: nick-invision/retry@v3 with: timeout_minutes: 10 @@ -193,7 +197,7 @@ jobs: DB_PORT: ${{ job.services.postgres.ports[5432] }} - name: Execute Dusk tests (only table tests - SQLite) - if: ${{ matrix.db == 'sqlite' }} + if: "${{ matrix.db == 'sqlite' }}" uses: nick-invision/retry@v3 with: timeout_minutes: 10 diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index b12ea517..eeeef7f4 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -1,15 +1,18 @@ name: run-tests -on: [push, pull_request] +on: + - push + - pull_request jobs: test: runs-on: ubuntu-latest + strategy: fail-fast: true matrix: php: [8.4, 8.3, 8.2] - laravel: [11.0, 10.0] + laravel: [10.0, 11.0, '12.0'] ssr: [true, false] dependency-version: [prefer-lowest, prefer-stable] include: @@ -17,6 +20,8 @@ jobs: testbench: 9.* - laravel: 10.0 testbench: 8.* + - laravel: '12.0' + testbench: 10.* exclude: - ssr: true dependency-version: prefer-lowest @@ -39,7 +44,6 @@ jobs: env: cache-name: cache-node-modules with: - # npm cache files are stored in `~/.npm` on Linux/macOS path: ~/.npm key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} restore-keys: | @@ -47,12 +51,12 @@ jobs: ${{ runner.os }}-build- ${{ runner.os }}- - - if: ${{ steps.cache-npm.outputs.cache-hit == 'false' }} + - if: "${{ steps.cache-npm.outputs.cache-hit == 'false' }}" name: List the state of node modules continue-on-error: true run: npm list - - name: "Install locked dependencies with npm" + - name: Install locked dependencies with npm run: | npm ci --ignore-scripts @@ -83,7 +87,7 @@ jobs: php artisan migrate:fresh --seed - name: Prepare L10 - if: ${{ matrix.laravel == '10.0' }} + if: "${{ matrix.laravel == '10.0' }}" run: | cd app rm composer.lock @@ -91,7 +95,7 @@ jobs: composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest - name: Prepare L11 - if: ${{ matrix.laravel == '11.0' }} + if: "${{ matrix.laravel == '11.0' }}" run: | cd app rm composer.lock @@ -119,7 +123,7 @@ jobs: cd app sed -i -e "s|SPLADE_SSR_ENABLED=false|SPLADE_SSR_ENABLED=true|g" .env node bootstrap/ssr/ssr.mjs & - if: matrix.ssr == true + if: 'matrix.ssr == true' - name: Run Laravel Server run: | From 9e53aac225474673a499cb71e4c0c64c7bc4d70f Mon Sep 17 00:00:00 2001 From: Pascal Baljet Date: Fri, 21 Feb 2025 09:38:01 +0100 Subject: [PATCH 03/10] Remove L12 from stubs test --- .github/workflows/run-stub-tests.yml | 2 +- .github/workflows/run-table-tests.yml | 9 +++++---- .github/workflows/run-tests.yml | 8 ++++---- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/.github/workflows/run-stub-tests.yml b/.github/workflows/run-stub-tests.yml index ad067f8f..efe1a60f 100644 --- a/.github/workflows/run-stub-tests.yml +++ b/.github/workflows/run-stub-tests.yml @@ -13,7 +13,7 @@ jobs: matrix: os: [ubuntu-22.04, windows-latest] php: [8.4, 8.3, 8.2] - laravel: [10.2, 11.0, '12.0'] + laravel: [10.2, 11.0] exclude: - php: 8.4 laravel: 10.0 diff --git a/.github/workflows/run-table-tests.yml b/.github/workflows/run-table-tests.yml index 57cc4a81..26c01ef4 100644 --- a/.github/workflows/run-table-tests.yml +++ b/.github/workflows/run-table-tests.yml @@ -12,17 +12,18 @@ jobs: fail-fast: true matrix: php: [8.4, 8.3, 8.2] - laravel: [10.0, 11.0, '12.0'] + laravel: [10.0, 11.0, 12.0] db: [mysql, postgres, sqlite] ssr: [true, false] dependency-version: [prefer-lowest, prefer-stable] include: + - laravel: 12.0 + testbench: 10.* - laravel: 11.0 testbench: 9.* - laravel: 10.0 testbench: 8.* - - laravel: '12.0' - testbench: 10.* + exclude: - dependency-version: prefer-lowest ssr: true @@ -144,7 +145,7 @@ jobs: cd app sed -i -e "s|SPLADE_SSR_ENABLED=false|SPLADE_SSR_ENABLED=true|g" .env node bootstrap/ssr/ssr.mjs & - if: 'matrix.ssr == true' + if: "matrix.ssr == true" - name: Migrate DB and Run Laravel Server (MySQL) run: | diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index eeeef7f4..368c6751 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -12,16 +12,16 @@ jobs: fail-fast: true matrix: php: [8.4, 8.3, 8.2] - laravel: [10.0, 11.0, '12.0'] + laravel: [10.0, 11.0, 12.0] ssr: [true, false] dependency-version: [prefer-lowest, prefer-stable] include: + - laravel: 12.0 + testbench: 10.* - laravel: 11.0 testbench: 9.* - laravel: 10.0 testbench: 8.* - - laravel: '12.0' - testbench: 10.* exclude: - ssr: true dependency-version: prefer-lowest @@ -123,7 +123,7 @@ jobs: cd app sed -i -e "s|SPLADE_SSR_ENABLED=false|SPLADE_SSR_ENABLED=true|g" .env node bootstrap/ssr/ssr.mjs & - if: 'matrix.ssr == true' + if: "matrix.ssr == true" - name: Run Laravel Server run: | From 7b3ce5edc3730693ab85826f0edbaaf92d524524 Mon Sep 17 00:00:00 2001 From: Pascal Baljet Date: Fri, 21 Feb 2025 09:38:36 +0100 Subject: [PATCH 04/10] Update composer.json --- app/composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/composer.json b/app/composer.json index 63e62c72..08fb2669 100644 --- a/app/composer.json +++ b/app/composer.json @@ -11,7 +11,7 @@ "php": "^8.4|^8.3|^8.2", "guzzlehttp/guzzle": "^7.2", "kirschbaum-development/eloquent-power-joins": "^3.0", - "laravel/framework": "^10.48.23|^11.33", + "laravel/framework": "^10.48.23|^11.33|^12.0", "laravel/reverb": "^1.4.3", "laravel/sanctum": "^3.2|^4.0", "laravel/tinker": "^2.7", From 878dfea02e95185d0b98b6ee20a57b8c8d77ff11 Mon Sep 17 00:00:00 2001 From: Pascal Baljet Date: Fri, 21 Feb 2025 09:44:53 +0100 Subject: [PATCH 05/10] Bumped packages --- app/composer.json | 8 ++++---- composer.json | 4 ++-- src/SpladeQueryBuilder.php | 9 ++++----- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/app/composer.json b/app/composer.json index 08fb2669..59164d48 100644 --- a/app/composer.json +++ b/app/composer.json @@ -10,18 +10,18 @@ "require": { "php": "^8.4|^8.3|^8.2", "guzzlehttp/guzzle": "^7.2", - "kirschbaum-development/eloquent-power-joins": "^3.0", + "kirschbaum-development/eloquent-power-joins": "^3.0|^4.0", "laravel/framework": "^10.48.23|^11.33|^12.0", "laravel/reverb": "^1.4.3", "laravel/sanctum": "^3.2|^4.0", "laravel/tinker": "^2.7", "maatwebsite/excel": "^3.1", "monolog/monolog": "^3.0", - "nesbot/carbon": "^2.63", + "nesbot/carbon": "^2.63|^3.0", "psr/simple-cache": "^2.0", "ramsey/collection": "^1.2", "spatie/laravel-medialibrary": "^11.0", - "spatie/laravel-query-builder": "^5.0" + "spatie/laravel-query-builder": "^5.0|^6.0|dev-main" }, "require-dev": { "barryvdh/laravel-debugbar": "^3.7", @@ -29,7 +29,7 @@ "laravel/dusk": "^8.2.11", "mockery/mockery": "^1.4.4", "nunomaduro/collision": "^7.10|^8.1", - "phpunit/phpunit": "^10.4", + "phpunit/phpunit": "^10.4|^11.5.3", "protonemedia/laravel-splade": "*", "spatie/ignition": "^1.4.1", "spatie/invade": "^1.1", diff --git a/composer.json b/composer.json index 7293512f..2cc24dae 100644 --- a/composer.json +++ b/composer.json @@ -27,7 +27,7 @@ "phpunit/phpunit": "^10.4|^11.5.3" }, "suggest": { - "kirschbaum-development/eloquent-power-joins": "Required to enable support sorting by (nested) relationships in Splade Tables (^3.0)", + "kirschbaum-development/eloquent-power-joins": "Required to enable support sorting by (nested) relationships in Splade Tables (^3.0|^4.0)", "maatwebsite/excel": "Required to enable support exports in Splade Tables (^3.1)", "spatie/fractalistic": "Required to enable support for Fractal transformers (^2.9)" }, @@ -70,4 +70,4 @@ }, "minimum-stability": "dev", "prefer-stable": true -} +} \ No newline at end of file diff --git a/src/SpladeQueryBuilder.php b/src/SpladeQueryBuilder.php index 78c7d9d4..acb2bc10 100644 --- a/src/SpladeQueryBuilder.php +++ b/src/SpladeQueryBuilder.php @@ -10,6 +10,7 @@ use Illuminate\Support\Arr; use Illuminate\Support\Collection; use Illuminate\Support\Str; +use Kirschbaum\PowerJoins\EloquentJoins; use Kirschbaum\PowerJoins\PowerJoins; use ProtoneMedia\Splade\Table\Column; use ProtoneMedia\Splade\Table\Filter; @@ -203,11 +204,9 @@ private function applySorting(Column $column) return $this->builder->orderBy($column->key, $column->sorted); } - if (!trait_exists(PowerJoins::class)) { - throw new PowerJoinsException( - "To order the query using a column from a relationship, please install the 'kirschbaum-development/eloquent-power-joins' package." - ); - } + class_exists(EloquentJoins::class) || throw new PowerJoinsException( + "To order the query using a column from a relationship, please install the 'kirschbaum-development/eloquent-power-joins' package." + ); if (!trait_uses_recursive($this->builder->getModel(), PowerJoins::class)) { throw new PowerJoinsException( From c8f47b9f90190c97b0c2caf40601324542ed6248 Mon Sep 17 00:00:00 2001 From: Pascal Baljet Date: Fri, 21 Feb 2025 09:48:08 +0100 Subject: [PATCH 06/10] Update SpladeQueryBuilder.php --- src/SpladeQueryBuilder.php | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/SpladeQueryBuilder.php b/src/SpladeQueryBuilder.php index acb2bc10..d26653d7 100644 --- a/src/SpladeQueryBuilder.php +++ b/src/SpladeQueryBuilder.php @@ -11,7 +11,6 @@ use Illuminate\Support\Collection; use Illuminate\Support\Str; use Kirschbaum\PowerJoins\EloquentJoins; -use Kirschbaum\PowerJoins\PowerJoins; use ProtoneMedia\Splade\Table\Column; use ProtoneMedia\Splade\Table\Filter; use ProtoneMedia\Splade\Table\PowerJoinsException; @@ -208,12 +207,6 @@ class_exists(EloquentJoins::class) || throw new PowerJoinsException( "To order the query using a column from a relationship, please install the 'kirschbaum-development/eloquent-power-joins' package." ); - if (!trait_uses_recursive($this->builder->getModel(), PowerJoins::class)) { - throw new PowerJoinsException( - "To order the query using a column from a relationship, make sure the Model uses the 'PowerJoins' trait." - ); - } - // Apply the sorting using the PowerJoins package. return $this->builder->orderByLeftPowerJoins($column->key, $column->sorted); } From c6c08bd79d42a9611253c45682200d0d3108991e Mon Sep 17 00:00:00 2001 From: Pascal Baljet Date: Fri, 21 Feb 2025 09:51:28 +0100 Subject: [PATCH 07/10] Update Project.php --- app/app/Models/Project.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/app/Models/Project.php b/app/app/Models/Project.php index 77b5c2a5..7adc33f2 100644 --- a/app/app/Models/Project.php +++ b/app/app/Models/Project.php @@ -4,12 +4,10 @@ use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; -use Kirschbaum\PowerJoins\PowerJoins; class Project extends Model { use HasFactory; - use PowerJoins; protected $guarded = []; From 3b95dce44096d03024199fd20149ef0fa696c12e Mon Sep 17 00:00:00 2001 From: Pascal Baljet Date: Fri, 21 Feb 2025 09:53:30 +0100 Subject: [PATCH 08/10] Bump package --- app/composer.json | 2 +- composer.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/composer.json b/app/composer.json index 59164d48..5a65d825 100644 --- a/app/composer.json +++ b/app/composer.json @@ -10,7 +10,7 @@ "require": { "php": "^8.4|^8.3|^8.2", "guzzlehttp/guzzle": "^7.2", - "kirschbaum-development/eloquent-power-joins": "^3.0|^4.0", + "kirschbaum-development/eloquent-power-joins": "^4.0", "laravel/framework": "^10.48.23|^11.33|^12.0", "laravel/reverb": "^1.4.3", "laravel/sanctum": "^3.2|^4.0", diff --git a/composer.json b/composer.json index 2cc24dae..7ec68cf6 100644 --- a/composer.json +++ b/composer.json @@ -27,7 +27,7 @@ "phpunit/phpunit": "^10.4|^11.5.3" }, "suggest": { - "kirschbaum-development/eloquent-power-joins": "Required to enable support sorting by (nested) relationships in Splade Tables (^3.0|^4.0)", + "kirschbaum-development/eloquent-power-joins": "Required to enable support sorting by (nested) relationships in Splade Tables (^4.0)", "maatwebsite/excel": "Required to enable support exports in Splade Tables (^3.1)", "spatie/fractalistic": "Required to enable support for Fractal transformers (^2.9)" }, From 9bb2b8d25004dd33f883e2cb5e8be2f5625e393f Mon Sep 17 00:00:00 2001 From: Pascal Baljet Date: Fri, 21 Feb 2025 10:10:21 +0100 Subject: [PATCH 09/10] Upgraded to attributes --- app/tests/Browser/AuthTest.php | 2 +- app/tests/Browser/Bridge/InlineTest.php | 2 +- app/tests/Browser/Bridge/MethodTest.php | 6 +-- app/tests/Browser/Bridge/PropsTest.php | 2 +- app/tests/Browser/Bridge/SlotTest.php | 2 +- app/tests/Browser/ContentTest.php | 2 +- app/tests/Browser/CustomTest.php | 2 +- app/tests/Browser/DataStoreTest.php | 8 ++-- app/tests/Browser/DataTest.php | 12 ++--- app/tests/Browser/DeferTest.php | 12 ++--- app/tests/Browser/DialogTest.php | 2 +- app/tests/Browser/ErrorsTest.php | 2 +- app/tests/Browser/EventBusTest.php | 2 +- app/tests/Browser/EventTest.php | 16 +++---- app/tests/Browser/FlashTest.php | 2 +- app/tests/Browser/Form/AttributesTest.php | 14 +++--- app/tests/Browser/Form/ComponentsTest.php | 6 +-- app/tests/Browser/Form/CustomVueModelTest.php | 2 +- app/tests/Browser/Form/DefaultsTest.php | 8 ++-- .../Browser/Form/FilepondExistingTest.php | 20 ++++---- app/tests/Browser/Form/FilepondTest.php | 20 ++++---- .../Browser/Form/FilepondValidationTest.php | 16 +++---- app/tests/Browser/Form/LibrariesTest.php | 34 ++++++------- app/tests/Browser/Form/RelationsTest.php | 12 ++--- .../Browser/Form/SelectDependentTest.php | 48 +++++++------------ .../Browser/Form/SelectPlaceholderTest.php | 8 ++-- app/tests/Browser/Form/SelectRemoteTest.php | 4 +- app/tests/Browser/Form/SimpleTest.php | 8 ++-- app/tests/Browser/Form/SubmitOnChangeTest.php | 10 ++-- app/tests/Browser/Form/TransformerTest.php | 2 +- app/tests/Browser/Form/ValidationTest.php | 4 +- app/tests/Browser/FormBuilderTest.php | 10 ++-- app/tests/Browser/FormDownloadTest.php | 6 +-- .../Browser/FormLibrariesInModalTest.php | 16 +++---- app/tests/Browser/FormTest.php | 48 +++++++++---------- app/tests/Browser/HeadTest.php | 6 +-- app/tests/Browser/LazyTest.php | 6 +-- app/tests/Browser/ModalTest.php | 32 +++++-------- app/tests/Browser/NavigationTest.php | 36 +++++++------- app/tests/Browser/PersistentLayoutTest.php | 8 ++-- app/tests/Browser/PreloadedModalTest.php | 12 ++--- app/tests/Browser/PreserveScrollTest.php | 2 +- app/tests/Browser/RehydrateTest.php | 8 ++-- app/tests/Browser/ScriptTest.php | 2 +- app/tests/Browser/StateTest.php | 2 +- app/tests/Browser/Table/AutoFillTest.php | 18 ++----- app/tests/Browser/Table/BulkActionTest.php | 14 +++--- app/tests/Browser/Table/CaseTest.php | 18 ++----- app/tests/Browser/Table/ColumnTest.php | 11 ++--- app/tests/Browser/Table/CustomTest.php | 11 ++--- app/tests/Browser/Table/DropdownTest.php | 11 ++--- app/tests/Browser/Table/EmptyTest.php | 8 +--- app/tests/Browser/Table/ExportTest.php | 8 ++-- app/tests/Browser/Table/FilterTest.php | 25 +++------- app/tests/Browser/Table/GlobalSearchTest.php | 18 ++----- app/tests/Browser/Table/InputSearchTest.php | 18 ++----- app/tests/Browser/Table/ModalTest.php | 16 ++----- app/tests/Browser/Table/PaginationTest.php | 25 +++------- .../Browser/Table/PreserveScrollTest.php | 12 ++--- app/tests/Browser/Table/RelationsTest.php | 25 +++------- app/tests/Browser/Table/ResetTest.php | 46 +++++------------- app/tests/Browser/Table/RowLinkTest.php | 25 +++------- app/tests/Browser/Table/ScrollTest.php | 12 ++--- app/tests/Browser/Table/SortTest.php | 11 ++--- app/tests/Browser/TeleportTest.php | 2 +- app/tests/Browser/ToastTest.php | 20 ++++---- app/tests/Browser/ToggleTest.php | 8 ++-- app/tests/Browser/TransitionTest.php | 2 +- app/tests/DuskTestCase.php | 4 +- app/tests/Feature/HeadTest.php | 2 +- app/tests/Feature/LazyTest.php | 4 +- app/tests/Feature/SsrTest.php | 4 +- app/tests/Unit/BladeDirectivesTest.php | 8 ++-- .../Unit/Bridge/ComponentControllerTest.php | 14 +++--- .../Unit/Bridge/ComponentMiddlewareTest.php | 4 +- app/tests/Unit/Bridge/ComponentStateTest.php | 8 ++-- .../Unit/CleanupTemporaryFileUploadsTest.php | 2 +- app/tests/Unit/ExistingFileTest.php | 18 +++---- app/tests/Unit/HeadTest.php | 22 ++++----- app/tests/Unit/SerializesNewModelsTest.php | 10 ++-- app/tests/Unit/SpladeCoreTest.php | 6 +-- app/tests/Unit/SpladeMiddlewareTest.php | 2 +- app/tests/Unit/SpladeQueryBuilderTest.php | 4 +- app/tests/Unit/SpladeTableTest.php | 4 +- app/tests/Unit/TableExporterTest.php | 10 ++-- app/tests/Unit/ToastTest.php | 2 +- app/tests/Unit/TransformerTest.php | 24 +++++----- app/tests/Unit/WithVueTest.php | 8 ++-- 88 files changed, 423 insertions(+), 585 deletions(-) diff --git a/app/tests/Browser/AuthTest.php b/app/tests/Browser/AuthTest.php index c2d60cf3..088bc7b4 100644 --- a/app/tests/Browser/AuthTest.php +++ b/app/tests/Browser/AuthTest.php @@ -7,7 +7,7 @@ class AuthTest extends DuskTestCase { - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_handles_the_login_redirect() { $this->browse(function (Browser $browser) { diff --git a/app/tests/Browser/Bridge/InlineTest.php b/app/tests/Browser/Bridge/InlineTest.php index 576cfb68..0fdd02c8 100644 --- a/app/tests/Browser/Bridge/InlineTest.php +++ b/app/tests/Browser/Bridge/InlineTest.php @@ -7,7 +7,7 @@ class InlineTest extends DuskTestCase { - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_supports_inline_templates() { $this->browse(function (Browser $browser) { diff --git a/app/tests/Browser/Bridge/MethodTest.php b/app/tests/Browser/Bridge/MethodTest.php index db54d3c2..183d60fd 100644 --- a/app/tests/Browser/Bridge/MethodTest.php +++ b/app/tests/Browser/Bridge/MethodTest.php @@ -8,7 +8,7 @@ class MethodTest extends DuskTestCase { - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_call_a_php_method_without_losing_state() { $this->browse(function (Browser $browser) { @@ -24,7 +24,7 @@ public function it_can_call_a_php_method_without_losing_state() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_call_a_php_method_with_arguments() { $this->browse(function (Browser $browser) { @@ -40,7 +40,7 @@ public function it_can_call_a_php_method_with_arguments() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_save_eloquent_models_and_refresh_the_state() { $this->browse(function (Browser $browser) { diff --git a/app/tests/Browser/Bridge/PropsTest.php b/app/tests/Browser/Bridge/PropsTest.php index 807af6dd..c555ec91 100644 --- a/app/tests/Browser/Bridge/PropsTest.php +++ b/app/tests/Browser/Bridge/PropsTest.php @@ -8,7 +8,7 @@ class PropsTest extends DuskTestCase { - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_has_two_way_binding_between_vue_and_php() { $this->browse(function (Browser $browser) { diff --git a/app/tests/Browser/Bridge/SlotTest.php b/app/tests/Browser/Bridge/SlotTest.php index e2f5e14d..c7763436 100644 --- a/app/tests/Browser/Bridge/SlotTest.php +++ b/app/tests/Browser/Bridge/SlotTest.php @@ -8,7 +8,7 @@ class SlotTest extends DuskTestCase { - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_renders_the_original_view_in_the_vue_component() { $this->browse(function (Browser $browser) { diff --git a/app/tests/Browser/ContentTest.php b/app/tests/Browser/ContentTest.php index 3bcb9d9a..b58ac407 100644 --- a/app/tests/Browser/ContentTest.php +++ b/app/tests/Browser/ContentTest.php @@ -7,7 +7,7 @@ class ContentTest extends DuskTestCase { - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_render_rendered_html() { $this->browse(function (Browser $browser) { diff --git a/app/tests/Browser/CustomTest.php b/app/tests/Browser/CustomTest.php index 65b70263..eb1a31a2 100644 --- a/app/tests/Browser/CustomTest.php +++ b/app/tests/Browser/CustomTest.php @@ -7,7 +7,7 @@ class CustomTest extends DuskTestCase { - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_use_a_custom_component() { $this->browse(function (Browser $browser) { diff --git a/app/tests/Browser/DataStoreTest.php b/app/tests/Browser/DataStoreTest.php index 456df41a..c2175d90 100644 --- a/app/tests/Browser/DataStoreTest.php +++ b/app/tests/Browser/DataStoreTest.php @@ -7,7 +7,7 @@ class DataStoreTest extends DuskTestCase { - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_has_two_way_binding_for_multiple_data_sets() { $this->browse(function (Browser $browser) { @@ -24,7 +24,7 @@ public function it_has_two_way_binding_for_multiple_data_sets() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_have_multiple_default_data_sets() { $this->browse(function (Browser $browser) { @@ -43,7 +43,7 @@ public function it_can_have_multiple_default_data_sets() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_remember_the_state_of_the_data() { $this->browse(function (Browser $browser) { @@ -71,7 +71,7 @@ public function it_can_remember_the_state_of_the_data() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_remember_the_state_of_the_data_in_local_storage() { $this->browse(function (Browser $browser) { diff --git a/app/tests/Browser/DataTest.php b/app/tests/Browser/DataTest.php index ba297ab1..220e9d44 100644 --- a/app/tests/Browser/DataTest.php +++ b/app/tests/Browser/DataTest.php @@ -7,7 +7,7 @@ class DataTest extends DuskTestCase { - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_has_two_way_binding() { $this->browse(function (Browser $browser) { @@ -18,7 +18,7 @@ public function it_has_two_way_binding() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_have_a_default_data_set() { $this->browse(function (Browser $browser) { @@ -34,7 +34,7 @@ public function it_can_have_a_default_data_set() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_bind_an_eloquent_model() { $this->browse(function (Browser $browser) { @@ -44,7 +44,7 @@ public function it_can_bind_an_eloquent_model() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_remember_the_state_of_the_data() { $this->browse(function (Browser $browser) { @@ -62,7 +62,7 @@ public function it_can_remember_the_state_of_the_data() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_remember_the_state_of_the_data_with_a_default_dataset() { $this->browse(function (Browser $browser) { @@ -80,7 +80,7 @@ public function it_can_remember_the_state_of_the_data_with_a_default_dataset() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_remember_the_state_of_the_data_in_local_storage() { $this->browse(function (Browser $browser) { diff --git a/app/tests/Browser/DeferTest.php b/app/tests/Browser/DeferTest.php index 08d05dee..7336d3f1 100644 --- a/app/tests/Browser/DeferTest.php +++ b/app/tests/Browser/DeferTest.php @@ -7,7 +7,7 @@ class DeferTest extends DuskTestCase { - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_loads_the_data_from_the_api() { $this->browse(function (Browser $browser) { @@ -19,7 +19,7 @@ public function it_loads_the_data_from_the_api() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_loads_the_data_from_a_dynamic_url() { $this->browse(function (Browser $browser) { @@ -31,7 +31,7 @@ public function it_loads_the_data_from_a_dynamic_url() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_use_the_poll_attribute_to_poll_for_new_data() { $this->browse(function (Browser $browser) { @@ -44,7 +44,7 @@ public function it_can_use_the_poll_attribute_to_poll_for_new_data() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_manually_wait_for_a_watched_value_to_change() { $this->browse(function (Browser $browser) { @@ -58,7 +58,7 @@ public function it_can_manually_wait_for_a_watched_value_to_change() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_reload_the_request() { $this->browse(function (Browser $browser) { @@ -70,7 +70,7 @@ public function it_can_reload_the_request() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_use_the_request_attribute_with_a_javascript_object() { $this->browse(function (Browser $browser) { diff --git a/app/tests/Browser/DialogTest.php b/app/tests/Browser/DialogTest.php index bfe4abac..6b24ae7e 100644 --- a/app/tests/Browser/DialogTest.php +++ b/app/tests/Browser/DialogTest.php @@ -7,7 +7,7 @@ class DialogTest extends DuskTestCase { - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_hides_the_dialog_on_navigation() { $this->browse(function (Browser $browser) { diff --git a/app/tests/Browser/ErrorsTest.php b/app/tests/Browser/ErrorsTest.php index 59294a2c..fd8bee65 100644 --- a/app/tests/Browser/ErrorsTest.php +++ b/app/tests/Browser/ErrorsTest.php @@ -7,7 +7,7 @@ class ErrorsTest extends DuskTestCase { - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_show_the_errors_from_the_session() { $this->browse(function (Browser $browser) { diff --git a/app/tests/Browser/EventBusTest.php b/app/tests/Browser/EventBusTest.php index 83e859fd..d8457405 100644 --- a/app/tests/Browser/EventBusTest.php +++ b/app/tests/Browser/EventBusTest.php @@ -7,7 +7,7 @@ class EventBusTest extends DuskTestCase { - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_subscribe_to_an_event_with_a_custom_script() { $this->browse(function (Browser $browser) { diff --git a/app/tests/Browser/EventTest.php b/app/tests/Browser/EventTest.php index 5fb01e83..c3a69849 100644 --- a/app/tests/Browser/EventTest.php +++ b/app/tests/Browser/EventTest.php @@ -11,7 +11,7 @@ class EventTest extends DuskTestCase { use UsesWebsocketsServerTrait; - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_redirect_on_an_event() { $this->browse(function (Browser $browser) { @@ -34,7 +34,7 @@ public function it_can_redirect_on_an_event() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_refresh_on_an_event() { $this->browse(function (Browser $browser) { @@ -59,7 +59,7 @@ public function it_can_refresh_on_an_event() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_refresh_on_an_event_while_preserving_the_scroll_position_from_the_event() { $this->browse(function (Browser $browser) { @@ -94,7 +94,7 @@ public function it_can_refresh_on_an_event_while_preserving_the_scroll_position_ }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_refresh_on_an_event_while_preserving_the_scroll_position_from_the_template() { $this->browse(function (Browser $browser) { @@ -129,7 +129,7 @@ public function it_can_refresh_on_an_event_while_preserving_the_scroll_position_ }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_waits_for_a_redirect_until_the_modal_is_closed() { $this->browse(function (Browser $browser) { @@ -156,7 +156,7 @@ public function it_waits_for_a_redirect_until_the_modal_is_closed() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_waits_for_a_refresh_until_the_modal_is_closed() { $this->browse(function (Browser $browser) { @@ -186,7 +186,7 @@ public function it_waits_for_a_refresh_until_the_modal_is_closed() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_show_the_event() { $this->browse(function (Browser $browser) { @@ -210,7 +210,7 @@ public function it_can_show_the_event() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_show_a_toast() { $this->browse(function (Browser $browser) { diff --git a/app/tests/Browser/FlashTest.php b/app/tests/Browser/FlashTest.php index 21a1cd46..9d44fa5b 100644 --- a/app/tests/Browser/FlashTest.php +++ b/app/tests/Browser/FlashTest.php @@ -7,7 +7,7 @@ class FlashTest extends DuskTestCase { - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_interact_with_flashed_data() { $this->browse(function (Browser $browser) { diff --git a/app/tests/Browser/Form/AttributesTest.php b/app/tests/Browser/Form/AttributesTest.php index d8a53210..227c8017 100644 --- a/app/tests/Browser/Form/AttributesTest.php +++ b/app/tests/Browser/Form/AttributesTest.php @@ -7,7 +7,7 @@ class AttributesTest extends DuskTestCase { - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_guards_the_unused_eloquent_attributes_by_default() { $this->browse(function (Browser $browser) { @@ -24,7 +24,7 @@ public function it_guards_the_unused_eloquent_attributes_by_default() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_guards_the_unused_fluent_attributes_by_default() { $this->browse(function (Browser $browser) { @@ -41,7 +41,7 @@ public function it_guards_the_unused_fluent_attributes_by_default() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_unguard_by_attribute() { $this->browse(function (Browser $browser) { @@ -51,7 +51,7 @@ public function it_can_unguard_by_attribute() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_unguard_by_default() { $this->browse(function (Browser $browser) { @@ -61,7 +61,7 @@ public function it_can_unguard_by_default() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_fills_undefined_attributes_from_default_json_data() { $this->browse(function (Browser $browser) { @@ -71,7 +71,7 @@ public function it_fills_undefined_attributes_from_default_json_data() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_fills_undefined_attributes_from_default_php_data() { $this->browse(function (Browser $browser) { @@ -81,7 +81,7 @@ public function it_fills_undefined_attributes_from_default_php_data() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_handles_nested_numeric_keys() { $this->browse(function (Browser $browser) { diff --git a/app/tests/Browser/Form/ComponentsTest.php b/app/tests/Browser/Form/ComponentsTest.php index c3615388..8f416bb6 100644 --- a/app/tests/Browser/Form/ComponentsTest.php +++ b/app/tests/Browser/Form/ComponentsTest.php @@ -7,7 +7,7 @@ class ComponentsTest extends DuskTestCase { - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_render_multiple_checkboxes_with_an_options_array() { $this->browse(function (Browser $browser) { @@ -25,7 +25,7 @@ public function it_can_render_multiple_checkboxes_with_an_options_array() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_render_multiple_radios_with_an_options_array() { $this->browse(function (Browser $browser) { @@ -38,7 +38,7 @@ public function it_can_render_multiple_radios_with_an_options_array() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_change_the_value_of_a_checkbox_element() { $this->browse(function (Browser $browser) { diff --git a/app/tests/Browser/Form/CustomVueModelTest.php b/app/tests/Browser/Form/CustomVueModelTest.php index 43406941..d24adaea 100644 --- a/app/tests/Browser/Form/CustomVueModelTest.php +++ b/app/tests/Browser/Form/CustomVueModelTest.php @@ -7,7 +7,7 @@ class CustomVueModelTest extends DuskTestCase { - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_submits_the_filled_elements() { $this->browse(function (Browser $browser) { diff --git a/app/tests/Browser/Form/DefaultsTest.php b/app/tests/Browser/Form/DefaultsTest.php index fed42611..c89265b6 100644 --- a/app/tests/Browser/Form/DefaultsTest.php +++ b/app/tests/Browser/Form/DefaultsTest.php @@ -7,7 +7,7 @@ class DefaultsTest extends DuskTestCase { - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_use_the_choices_library_by_default() { $this->browse(function (Browser $browser) { @@ -18,7 +18,7 @@ public function it_can_use_the_choices_library_by_default() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_use_the_flatpickr_library_by_default_with_a_default_date_format() { $this->browse(function (Browser $browser) { @@ -31,7 +31,7 @@ public function it_can_use_the_flatpickr_library_by_default_with_a_default_date_ }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_use_the_flatpickr_library_by_default_with_a_default_time_format() { $this->browse(function (Browser $browser) { @@ -44,7 +44,7 @@ public function it_can_use_the_flatpickr_library_by_default_with_a_default_time_ }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_select_the_default_option_when_the_options_attribute_is_not_used() { $this->browse(function (Browser $browser) { diff --git a/app/tests/Browser/Form/FilepondExistingTest.php b/app/tests/Browser/Form/FilepondExistingTest.php index bd7e49c3..2d91f2eb 100644 --- a/app/tests/Browser/Form/FilepondExistingTest.php +++ b/app/tests/Browser/Form/FilepondExistingTest.php @@ -16,7 +16,7 @@ protected function setUp(): void DatabaseSeeder::giveUserMedia(User::first()); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_keep_the_existing_single_media_upload() { $user = User::first(); @@ -38,7 +38,7 @@ public function it_can_keep_the_existing_single_media_upload() $this->assertTrue($user->fresh()->getFirstMedia('avatar')->is($media)); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_replace_the_existing_single_media_upload() { $user = User::first(); @@ -65,7 +65,7 @@ public function it_can_replace_the_existing_single_media_upload() $this->assertFalse($user->fresh()->getFirstMedia('avatar')->is($media)); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_delete_the_existing_single_media_upload() { $user = User::first(); @@ -91,7 +91,7 @@ public function it_can_delete_the_existing_single_media_upload() $this->assertNull($user->fresh()->getFirstMedia('avatar')); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_keep_the_existing_multiple_media_uploads() { $user = User::first(); @@ -116,7 +116,7 @@ public function it_can_keep_the_existing_multiple_media_uploads() $this->assertTrue($newMedia[1]->is($media[1])); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_add_a_file_to_the_existing_multiple_media_uploads() { $user = User::first(); @@ -144,7 +144,7 @@ public function it_can_add_a_file_to_the_existing_multiple_media_uploads() $this->assertEquals('small.jpeg', $newMedia[2]->file_name); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_delete_an_existing_multiple_media_upload() { $user = User::first(); @@ -171,7 +171,7 @@ public function it_can_delete_an_existing_multiple_media_upload() $this->assertTrue($newMedia[0]->is($media[1])); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_reorder_multiple_uploads() { $user = User::first(); @@ -198,7 +198,7 @@ public function it_can_reorder_multiple_uploads() $this->assertEquals('1.jpeg', $newMedia[1]->file_name); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_add_and_delete_and_reorder_in_one_request() { $user = User::first(); @@ -238,7 +238,7 @@ public function it_can_add_and_delete_and_reorder_in_one_request() $this->assertEquals('2.jpeg', $newMedia[1]->file_name); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_also_reorder_with_direct_uploads() { $user = User::first(); @@ -277,7 +277,7 @@ public function it_can_also_reorder_with_direct_uploads() $this->assertEquals('dummy2.txt', $newMedia[1]->file_name); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_add_a_file_from_a_external_link() { /** @var User $user */ diff --git a/app/tests/Browser/Form/FilepondTest.php b/app/tests/Browser/Form/FilepondTest.php index 12b058e3..61d47431 100644 --- a/app/tests/Browser/Form/FilepondTest.php +++ b/app/tests/Browser/Form/FilepondTest.php @@ -25,7 +25,7 @@ protected function tearDown(): void parent::tearDown(); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_upload_a_file_using_a_regular_single_request() { $this->browse(function (Browser $browser) { @@ -42,7 +42,7 @@ public function it_can_upload_a_file_using_a_regular_single_request() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_upload_multiple_files_using_a_regular_single_request() { $this->browse(function (Browser $browser) { @@ -62,7 +62,7 @@ public function it_can_upload_multiple_files_using_a_regular_single_request() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_upload_a_temporary_file_using_controller_middleware() { $this->browse(function (Browser $browser) { @@ -79,7 +79,7 @@ public function it_can_upload_a_temporary_file_using_controller_middleware() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_upload_multiple_temporary_files() { $this->browse(function (Browser $browser) { @@ -99,7 +99,7 @@ public function it_can_upload_multiple_temporary_files() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_upload_a_temporary_file_using_route_middleware() { $this->browse(function (Browser $browser) { @@ -116,7 +116,7 @@ public function it_can_upload_a_temporary_file_using_route_middleware() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_upload_a_temporary_file_using_a_form_request() { $this->browse(function (Browser $browser) { @@ -133,7 +133,7 @@ public function it_can_upload_a_temporary_file_using_a_form_request() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_upload_a_temporary_file_using_a_form_request_that_has_a_validation_rule_object() { $this->browse(function (Browser $browser) { @@ -150,7 +150,7 @@ public function it_can_upload_a_temporary_file_using_a_form_request_that_has_a_v }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_upload_a_temporary_file_using_a_form_request_and_it_clear_the_converted_files() { $this->browse(function (Browser $browser) { @@ -168,7 +168,7 @@ public function it_can_upload_a_temporary_file_using_a_form_request_and_it_clear }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_use_a_custom_js_config() { $this->browse(function (Browser $browser) { @@ -181,7 +181,7 @@ public function it_can_use_a_custom_js_config() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_use_a_custom_php_config() { $this->browse(function (Browser $browser) { diff --git a/app/tests/Browser/Form/FilepondValidationTest.php b/app/tests/Browser/Form/FilepondValidationTest.php index 6621d37d..680dc42c 100644 --- a/app/tests/Browser/Form/FilepondValidationTest.php +++ b/app/tests/Browser/Form/FilepondValidationTest.php @@ -7,7 +7,7 @@ class FilepondValidationTest extends DuskTestCase { - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_validate_the_file_type() { $this->browse(function (Browser $browser) { @@ -20,7 +20,7 @@ public function it_can_validate_the_file_type() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_validate_the_minimum_size() { $this->browse(function (Browser $browser) { @@ -33,7 +33,7 @@ public function it_can_validate_the_minimum_size() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_validate_the_maximum_size() { $this->browse(function (Browser $browser) { @@ -46,7 +46,7 @@ public function it_can_validate_the_maximum_size() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_validate_the_exact_image_size() { $this->browse(function (Browser $browser) { @@ -73,7 +73,7 @@ public function it_can_validate_the_exact_image_size() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_validate_the_minimum_image_size() { $this->browse(function (Browser $browser) { @@ -93,7 +93,7 @@ public function it_can_validate_the_minimum_image_size() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_validate_the_maximum_image_size() { $this->browse(function (Browser $browser) { @@ -113,7 +113,7 @@ public function it_can_validate_the_maximum_image_size() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_validate_the_minimum_resolution() { $this->browse(function (Browser $browser) { @@ -133,7 +133,7 @@ public function it_can_validate_the_minimum_resolution() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_validate_the_maximum_resolution() { $this->browse(function (Browser $browser) { diff --git a/app/tests/Browser/Form/LibrariesTest.php b/app/tests/Browser/Form/LibrariesTest.php index e5fc507e..59356e96 100644 --- a/app/tests/Browser/Form/LibrariesTest.php +++ b/app/tests/Browser/Form/LibrariesTest.php @@ -8,7 +8,7 @@ class LibrariesTest extends DuskTestCase { - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_selects_the_default_values() { $this->browse(function (Browser $browser) { @@ -25,7 +25,7 @@ public function it_selects_the_default_values() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_change_the_default_bound_values() { $this->browse(function (Browser $browser) { @@ -43,7 +43,7 @@ public function it_can_change_the_default_bound_values() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_autosize_the_textarea() { $this->browse(function (Browser $browser) { @@ -54,7 +54,7 @@ public function it_can_autosize_the_textarea() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_use_the_choices_js_library_for_a_select_element() { $this->browse(function (Browser $browser) { @@ -67,7 +67,7 @@ public function it_can_use_the_choices_js_library_for_a_select_element() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_use_the_choices_js_library_for_a_multiple_select_element() { $this->browse(function (Browser $browser) { @@ -82,7 +82,7 @@ public function it_can_use_the_choices_js_library_for_a_multiple_select_element( }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_provide_a_custom_set_of_php_options_to_choices_js() { $this->browse(function (Browser $browser) { @@ -95,7 +95,7 @@ public function it_can_provide_a_custom_set_of_php_options_to_choices_js() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_provide_a_custom_set_of_js_options_to_choices_js() { $this->browse(function (Browser $browser) { @@ -108,7 +108,7 @@ public function it_can_provide_a_custom_set_of_js_options_to_choices_js() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_use_flatpickr_to_pick_a_date() { $this->browse(function (Browser $browser) { @@ -121,7 +121,7 @@ public function it_can_use_flatpickr_to_pick_a_date() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_use_flatpickr_to_pick_a_time() { $this->browse(function (Browser $browser) { @@ -134,7 +134,7 @@ public function it_can_use_flatpickr_to_pick_a_time() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_use_flatpickr_to_pick_a_date_and_time() { $this->browse(function (Browser $browser) { @@ -148,7 +148,7 @@ public function it_can_use_flatpickr_to_pick_a_date_and_time() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_use_flatpickr_to_pick_a_date_range() { $this->browse(function (Browser $browser) { @@ -165,7 +165,7 @@ public function it_can_use_flatpickr_to_pick_a_date_range() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_provide_a_custom_set_of_php_options_to_flatpickr_through_the_date_attribute() { $this->browse(function (Browser $browser) { @@ -178,7 +178,7 @@ public function it_can_provide_a_custom_set_of_php_options_to_flatpickr_through_ }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_provide_a_custom_set_of_js_options_to_flatpickr_through_the_date_attribute() { $this->browse(function (Browser $browser) { @@ -191,7 +191,7 @@ public function it_can_provide_a_custom_set_of_js_options_to_flatpickr_through_t }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_provide_a_custom_set_of_php_options_to_flatpickr_through_the_time_attribute() { $this->browse(function (Browser $browser) { @@ -204,7 +204,7 @@ public function it_can_provide_a_custom_set_of_php_options_to_flatpickr_through_ }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_provide_a_custom_set_of_js_options_to_flatpickr_through_the_time_attribute() { $this->browse(function (Browser $browser) { @@ -217,7 +217,7 @@ public function it_can_provide_a_custom_set_of_js_options_to_flatpickr_through_t }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_submit_the_form_on_change() { $this->browse(function (Browser $browser) { @@ -229,7 +229,7 @@ public function it_can_submit_the_form_on_change() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_use_jodit_as_a_wysiwyg_editor() { $this->browse(function (Browser $browser) { diff --git a/app/tests/Browser/Form/RelationsTest.php b/app/tests/Browser/Form/RelationsTest.php index e0f9738f..f2ce9c77 100644 --- a/app/tests/Browser/Form/RelationsTest.php +++ b/app/tests/Browser/Form/RelationsTest.php @@ -11,7 +11,7 @@ class RelationsTest extends DuskTestCase { - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_find_the_default_value_of_a_nested_relationship() { $this->browse(function (Browser $browser) { @@ -23,7 +23,7 @@ public function it_can_find_the_default_value_of_a_nested_relationship() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_handle_a_belongs_to_many_relationship() { $tags = Tag::query()->get(); @@ -51,7 +51,7 @@ public function it_can_handle_a_belongs_to_many_relationship() $this->assertEquals($newIds, $user->tags()->get()->map->id->all()); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_handle_a_belongs_to_many_relationship_with_the_choices_library() { $tags = Tag::query()->get(); @@ -88,7 +88,7 @@ public function it_can_handle_a_belongs_to_many_relationship_with_the_choices_li $this->assertEquals($newIds, $user->tags()->get()->map->id->all()); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_handle_a_morph_to_many_relationship() { $keywords = Keyword::query()->get(); @@ -116,7 +116,7 @@ public function it_can_handle_a_morph_to_many_relationship() $this->assertEquals($newIds, $user->keywords()->get()->map->id->all()); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_handle_a_relationship_with_checkboxes() { $keywords = Keyword::query()->get(); @@ -148,7 +148,7 @@ public function it_can_handle_a_relationship_with_checkboxes() $this->assertEquals($newIds, $user->keywords()->get()->map->id->all()); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_have_two_forms_in_a_view_without_mixing_data() { $tags = Tag::query()->get(); diff --git a/app/tests/Browser/Form/SelectDependentTest.php b/app/tests/Browser/Form/SelectDependentTest.php index 2a67cad8..1de639c3 100644 --- a/app/tests/Browser/Form/SelectDependentTest.php +++ b/app/tests/Browser/Form/SelectDependentTest.php @@ -15,11 +15,9 @@ public static function dependentUrls() ]; } - /** - * @dataProvider dependentUrls - * - * @test - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dependentUrls')] + + #[\PHPUnit\Framework\Attributes\Test] public function it_restores_the_placeholder_on_regular_selects($url) { $this->browse(function (Browser $browser) use ($url) { @@ -38,11 +36,9 @@ public function it_restores_the_placeholder_on_regular_selects($url) }); } - /** - * @dataProvider dependentUrls - * - * @test - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dependentUrls')] + + #[\PHPUnit\Framework\Attributes\Test] public function it_restores_the_placeholder_on_choices_instances($url) { $this->browse(function (Browser $browser) use ($url) { @@ -63,11 +59,9 @@ public function it_restores_the_placeholder_on_choices_instances($url) }); } - /** - * @dataProvider dependentUrls - * - * @test - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dependentUrls')] + + #[\PHPUnit\Framework\Attributes\Test] public function it_restores_the_placeholder_on_regular_multiple_select($url) { $this->browse(function (Browser $browser) use ($url) { @@ -86,11 +80,9 @@ public function it_restores_the_placeholder_on_regular_multiple_select($url) }); } - /** - * @dataProvider dependentUrls - * - * @test - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dependentUrls')] + + #[\PHPUnit\Framework\Attributes\Test] public function it_restores_the_placeholder_on_choices_multiple_select($url) { $this->browse(function (Browser $browser) use ($url) { @@ -113,11 +105,9 @@ public function it_restores_the_placeholder_on_choices_multiple_select($url) }); } - /** - * @dataProvider dependentUrls - * - * @test - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dependentUrls')] + + #[\PHPUnit\Framework\Attributes\Test] public function it_can_select_the_first_remote_option($url) { $this->browse(function (Browser $browser) use ($url) { @@ -135,11 +125,9 @@ public function it_can_select_the_first_remote_option($url) }); } - /** - * @dataProvider dependentUrls - * - * @test - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dependentUrls')] + + #[\PHPUnit\Framework\Attributes\Test] public function it_can_reset_the_select_option_on_a_remote_url_change($url) { $this->browse(function (Browser $browser) use ($url) { diff --git a/app/tests/Browser/Form/SelectPlaceholderTest.php b/app/tests/Browser/Form/SelectPlaceholderTest.php index 19be810b..a69f8e18 100644 --- a/app/tests/Browser/Form/SelectPlaceholderTest.php +++ b/app/tests/Browser/Form/SelectPlaceholderTest.php @@ -9,7 +9,7 @@ class SelectPlaceholderTest extends DuskTestCase { - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_have_no_placeholder_on_regular_select_elements() { $this->browse(function (Browser $browser) { @@ -20,7 +20,7 @@ public function it_can_have_no_placeholder_on_regular_select_elements() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_have_a_placeholder_on_regular_select_elements_but_you_cant_select_it() { $this->browse(function (Browser $browser) { @@ -41,7 +41,7 @@ public function it_can_have_a_placeholder_on_regular_select_elements_but_you_can }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_have_no_placeholder_on_choices_instances() { $this->browse(function (Browser $browser) { @@ -79,7 +79,7 @@ public function it_can_have_no_placeholder_on_choices_instances() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_have_a_placeholder_on_choices_instances() { $this->browse(function (Browser $browser) { diff --git a/app/tests/Browser/Form/SelectRemoteTest.php b/app/tests/Browser/Form/SelectRemoteTest.php index 7a8b632b..425e1461 100644 --- a/app/tests/Browser/Form/SelectRemoteTest.php +++ b/app/tests/Browser/Form/SelectRemoteTest.php @@ -7,7 +7,7 @@ class SelectRemoteTest extends DuskTestCase { - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_load_options_from_a_key_value_source() { $this->browse(function (Browser $browser) { @@ -31,7 +31,7 @@ public function it_can_load_options_from_a_key_value_source() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_load_options_from_an_array_of_objects() { $this->browse(function (Browser $browser) { diff --git a/app/tests/Browser/Form/SimpleTest.php b/app/tests/Browser/Form/SimpleTest.php index 175bdf8b..f57e6931 100644 --- a/app/tests/Browser/Form/SimpleTest.php +++ b/app/tests/Browser/Form/SimpleTest.php @@ -7,7 +7,7 @@ class SimpleTest extends DuskTestCase { - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_shows_validation_errors_for_each_element() { $this->browse(function (Browser $browser) { @@ -27,7 +27,7 @@ public function it_shows_validation_errors_for_each_element() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_submits_the_filled_elements() { $this->browse(function (Browser $browser) { @@ -51,7 +51,7 @@ public function it_submits_the_filled_elements() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_read_an_image() { $this->browse(function (Browser $browser) { @@ -67,7 +67,7 @@ public function it_can_read_an_image() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_submit_a_value_in_the_submit_button() { $this->browse(function (Browser $browser) { diff --git a/app/tests/Browser/Form/SubmitOnChangeTest.php b/app/tests/Browser/Form/SubmitOnChangeTest.php index 21b0c359..154f9222 100644 --- a/app/tests/Browser/Form/SubmitOnChangeTest.php +++ b/app/tests/Browser/Form/SubmitOnChangeTest.php @@ -7,7 +7,7 @@ class SubmitOnChangeTest extends DuskTestCase { - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_submit_the_form_by_watching_value_changes() { $this->browse(function (Browser $browser) { @@ -22,7 +22,7 @@ public function it_can_submit_the_form_by_watching_value_changes() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_submit_the_form_by_watching_a_single_value_change() { $this->browse(function (Browser $browser) { @@ -38,7 +38,7 @@ public function it_can_submit_the_form_by_watching_a_single_value_change() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_submit_the_form_by_watching_a_string_of_attributes() { $this->browse(function (Browser $browser) { @@ -53,7 +53,7 @@ public function it_can_submit_the_form_by_watching_a_string_of_attributes() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_submit_the_form_by_watching_an_array_of_attributes() { $this->browse(function (Browser $browser) { @@ -68,7 +68,7 @@ public function it_can_submit_the_form_by_watching_an_array_of_attributes() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_submit_the_form_by_in_the_background() { $this->browse(function (Browser $browser) { diff --git a/app/tests/Browser/Form/TransformerTest.php b/app/tests/Browser/Form/TransformerTest.php index 5f24afac..5f5c529e 100644 --- a/app/tests/Browser/Form/TransformerTest.php +++ b/app/tests/Browser/Form/TransformerTest.php @@ -8,7 +8,7 @@ class TransformerTest extends DuskTestCase { - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_transform_models_and_relations() { $this->browse(function (Browser $browser) { diff --git a/app/tests/Browser/Form/ValidationTest.php b/app/tests/Browser/Form/ValidationTest.php index 3de0545f..94c56e6f 100644 --- a/app/tests/Browser/Form/ValidationTest.php +++ b/app/tests/Browser/Form/ValidationTest.php @@ -7,7 +7,7 @@ class ValidationTest extends DuskTestCase { - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_escapes_the_validation_messages_by_default() { $this->browse(function (Browser $browser) { @@ -19,7 +19,7 @@ public function it_escapes_the_validation_messages_by_default() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_disable_escaping_the_validation_messages() { $this->browse(function (Browser $browser) { diff --git a/app/tests/Browser/FormBuilderTest.php b/app/tests/Browser/FormBuilderTest.php index 8ac5629a..a201bc99 100644 --- a/app/tests/Browser/FormBuilderTest.php +++ b/app/tests/Browser/FormBuilderTest.php @@ -7,7 +7,7 @@ class FormBuilderTest extends DuskTestCase { - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_generate_and_submit_a_simple_form_with_formbuilder() { $this->browse(function (Browser $browser) { @@ -35,7 +35,7 @@ public function it_can_generate_and_submit_a_simple_form_with_formbuilder() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_generate_and_submit_a_form_from_a_form_class_with_formbuilder() { $this->browse(function (Browser $browser) { @@ -72,7 +72,7 @@ public function it_can_generate_and_submit_a_form_from_a_form_class_with_formbui }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_generate_a_form_with_formbuilder_and_bind_data_from_a_model() { $this->browse(function (Browser $browser) { @@ -104,7 +104,7 @@ public function it_can_generate_a_form_with_formbuilder_and_bind_data_from_a_mod }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_generate_multiple_forms_on_one_page() { $this->browse(function (Browser $browser) { @@ -121,7 +121,7 @@ public function it_can_generate_multiple_forms_on_one_page() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_show_a_jodit_wysiwyg_editor() { $this->browse(function (Browser $browser) { diff --git a/app/tests/Browser/FormDownloadTest.php b/app/tests/Browser/FormDownloadTest.php index 10c13c2c..a126a03a 100644 --- a/app/tests/Browser/FormDownloadTest.php +++ b/app/tests/Browser/FormDownloadTest.php @@ -7,7 +7,7 @@ class FormDownloadTest extends DuskTestCase { - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_download_a_file() { $this->browse(function (Browser $browser) { @@ -28,7 +28,7 @@ public function it_can_download_a_file() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_show_validation_errors_when_expecting_a_file_download() { $this->browse(function (Browser $browser) { @@ -39,7 +39,7 @@ public function it_can_show_validation_errors_when_expecting_a_file_download() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_show_server_errors_when_expecting_a_file_download() { $this->browse(function (Browser $browser) { diff --git a/app/tests/Browser/FormLibrariesInModalTest.php b/app/tests/Browser/FormLibrariesInModalTest.php index 70f2964c..d4cd44fc 100644 --- a/app/tests/Browser/FormLibrariesInModalTest.php +++ b/app/tests/Browser/FormLibrariesInModalTest.php @@ -8,7 +8,7 @@ class FormLibrariesInModalTest extends DuskTestCase { - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_autosize_the_textarea_in_a_modal() { $this->browse(function (Browser $browser) { @@ -23,7 +23,7 @@ public function it_can_autosize_the_textarea_in_a_modal() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_use_the_choices_js_library_for_a_select_element() { $this->browse(function (Browser $browser) { @@ -38,7 +38,7 @@ public function it_can_use_the_choices_js_library_for_a_select_element() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_use_the_choices_js_library_for_a_multiple_select_element_in_a_modal() { $this->browse(function (Browser $browser) { @@ -60,7 +60,7 @@ public function it_can_use_the_choices_js_library_for_a_multiple_select_element_ }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_close_the_choices_js_library_without_selecting_an_option() { $this->browse(function (Browser $browser) { @@ -79,7 +79,7 @@ public function it_can_close_the_choices_js_library_without_selecting_an_option( }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_use_flatpickr_to_pick_a_date() { $this->browse(function (Browser $browser) { @@ -94,7 +94,7 @@ public function it_can_use_flatpickr_to_pick_a_date() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_use_flatpickr_to_pick_a_time() { $this->browse(function (Browser $browser) { @@ -109,7 +109,7 @@ public function it_can_use_flatpickr_to_pick_a_time() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_use_flatpickr_to_pick_a_date_and_time() { $this->browse(function (Browser $browser) { @@ -125,7 +125,7 @@ public function it_can_use_flatpickr_to_pick_a_date_and_time() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_use_flatpickr_to_pick_a_date_range() { $this->browse(function (Browser $browser) { diff --git a/app/tests/Browser/FormTest.php b/app/tests/Browser/FormTest.php index ff2007aa..14e1f5a9 100644 --- a/app/tests/Browser/FormTest.php +++ b/app/tests/Browser/FormTest.php @@ -8,7 +8,7 @@ class FormTest extends DuskTestCase { - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_show_the_errors() { $this->browse(function (Browser $browser) { @@ -20,7 +20,7 @@ public function it_can_show_the_errors() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_show_the_errors_from_a_redirect() { $this->browse(function (Browser $browser) { @@ -32,7 +32,7 @@ public function it_can_show_the_errors_from_a_redirect() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_submit_data_to_a_get_endpoint() { $this->browse(function (Browser $browser) { @@ -47,7 +47,7 @@ public function it_can_submit_data_to_a_get_endpoint() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_submit_to_a_non_post_endpoint() { $this->browse(function (Browser $browser) { @@ -59,7 +59,7 @@ public function it_can_submit_to_a_non_post_endpoint() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_upload_a_file() { $this->browse(function (Browser $browser) { @@ -72,7 +72,7 @@ public function it_can_upload_a_file() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_restore_the_form_after_submit() { $this->browse(function (Browser $browser) { @@ -86,7 +86,7 @@ public function it_can_restore_the_form_after_submit() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_reset_the_form_after_submit() { $this->browse(function (Browser $browser) { @@ -99,7 +99,7 @@ public function it_can_reset_the_form_after_submit() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_ask_to_confirm_the_submit() { $this->browse(function (Browser $browser) { @@ -118,7 +118,7 @@ public function it_can_ask_to_confirm_the_submit() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_ask_to_confirm_the_submit_with_a_danger_button() { $this->browse(function (Browser $browser) { @@ -137,7 +137,7 @@ public function it_can_ask_to_confirm_the_submit_with_a_danger_button() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_ask_to_confirm_the_submit_with_custom_texts() { $this->browse(function (Browser $browser) { @@ -151,7 +151,7 @@ public function it_can_ask_to_confirm_the_submit_with_custom_texts() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_ask_to_confirm_the_submit_with_a_password() { $this->browse(function (Browser $browser) { @@ -184,7 +184,7 @@ public function it_can_ask_to_confirm_the_submit_with_a_password() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_check_the_password_confirmation_status() { $this->browse(function (Browser $browser) { @@ -207,7 +207,7 @@ public function it_can_check_the_password_confirmation_status() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_confirm_and_execute_a_callback_without_submitting() { $this->browse(function (Browser $browser) { @@ -222,7 +222,7 @@ public function it_can_confirm_and_execute_a_callback_without_submitting() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_have_a_default_js_object_value() { $this->browse(function (Browser $browser) { @@ -232,7 +232,7 @@ public function it_can_have_a_default_js_object_value() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_have_a_default_eloquent_value() { $this->browse(function (Browser $browser) { @@ -242,7 +242,7 @@ public function it_can_have_a_default_eloquent_value() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_have_a_default_array_value() { $this->browse(function (Browser $browser) { @@ -252,7 +252,7 @@ public function it_can_have_a_default_array_value() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_have_a_default_arrayable_value() { $this->browse(function (Browser $browser) { @@ -262,7 +262,7 @@ public function it_can_have_a_default_arrayable_value() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_have_a_default_json_value() { $this->browse(function (Browser $browser) { @@ -272,7 +272,7 @@ public function it_can_have_a_default_json_value() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_have_a_default_jsonable_value() { $this->browse(function (Browser $browser) { @@ -282,7 +282,7 @@ public function it_can_have_a_default_jsonable_value() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_have_a_default_json_serializable_value() { $this->browse(function (Browser $browser) { @@ -292,7 +292,7 @@ public function it_can_have_a_default_json_serializable_value() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_nested_values() { $this->browse(function (Browser $browser) { @@ -306,7 +306,7 @@ public function it_can_nested_values() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_show_the_forms_state_and_a_progress_bar() { $this->browse(function (Browser $browser) { @@ -325,7 +325,7 @@ public function it_can_show_the_forms_state_and_a_progress_bar() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_renders_classes_on_the_form_element() { $this->browse(function (Browser $browser) { @@ -335,7 +335,7 @@ public function it_renders_classes_on_the_form_element() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_submit_to_a_route_that_returns_a_view_instead_of_a_redirect() { $this->browse(function (Browser $browser) { diff --git a/app/tests/Browser/HeadTest.php b/app/tests/Browser/HeadTest.php index 7e4a5090..38ecb5bc 100644 --- a/app/tests/Browser/HeadTest.php +++ b/app/tests/Browser/HeadTest.php @@ -7,7 +7,7 @@ class HeadTest extends DuskTestCase { - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_updates_the_title_and_meta_and_link_tags() { $this->browse(function (Browser $browser) { @@ -33,7 +33,7 @@ public function it_updates_the_title_and_meta_and_link_tags() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_updates_the_head_when_modals_are_opened_and_closed() { $this->browse(function (Browser $browser) { @@ -62,7 +62,7 @@ public function it_updates_the_head_when_modals_are_opened_and_closed() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_has_blade_directives_to_set_the_seo() { $this->browse(function (Browser $browser) { diff --git a/app/tests/Browser/LazyTest.php b/app/tests/Browser/LazyTest.php index 55340aeb..76804936 100644 --- a/app/tests/Browser/LazyTest.php +++ b/app/tests/Browser/LazyTest.php @@ -7,7 +7,7 @@ class LazyTest extends DuskTestCase { - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_lazily_load_content() { $this->browse(function (Browser $browser) { @@ -30,7 +30,7 @@ public function it_can_lazily_load_content() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_resolve_an_external_url() { $this->browse(function (Browser $browser) { @@ -50,7 +50,7 @@ public function it_can_resolve_an_external_url() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_binds_the_lazy_loaded_content_to_the_global_data_store() { $this->browse(function (Browser $browser) { diff --git a/app/tests/Browser/ModalTest.php b/app/tests/Browser/ModalTest.php index ec3c231c..d2c18a9a 100644 --- a/app/tests/Browser/ModalTest.php +++ b/app/tests/Browser/ModalTest.php @@ -7,7 +7,7 @@ class ModalTest extends DuskTestCase { - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_show_a_modal() { $this->browse(function (Browser $browser) { @@ -30,7 +30,7 @@ public function it_can_show_a_modal() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_require_the_modal_to_be_explicitly_closed() { $this->browse(function (Browser $browser) { @@ -48,7 +48,7 @@ public function it_can_require_the_modal_to_be_explicitly_closed() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_do_nested_modals() { $this->browse(function (Browser $browser) { @@ -76,7 +76,7 @@ public function it_can_do_nested_modals() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_show_a_slideover() { $this->browse(function (Browser $browser) { @@ -100,7 +100,7 @@ public function it_can_show_a_slideover() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_show_a_slideover_on_the_left_side() { $this->browse(function (Browser $browser) { @@ -124,7 +124,7 @@ public function it_can_show_a_slideover_on_the_left_side() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_do_nested_slideover() { $this->browse(function (Browser $browser) { @@ -165,7 +165,7 @@ public function it_can_do_nested_slideover() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_shows_the_form_validation_inside_the_modal() { $this->browse(function (Browser $browser) { @@ -182,7 +182,7 @@ public function it_shows_the_form_validation_inside_the_modal() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_keep_the_modal_opened_after_submit() { $this->browse(function (Browser $browser) { @@ -199,7 +199,7 @@ public function it_can_keep_the_modal_opened_after_submit() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_optionally_hide_the_close_button() { $this->browse(function (Browser $browser) { @@ -223,11 +223,8 @@ public function it_can_optionally_hide_the_close_button() }); } - /** - * @test - * - * @dataProvider sizeAndPixels - */ + #[\PHPUnit\Framework\Attributes\Test] + #[\PHPUnit\Framework\Attributes\DataProvider('sizeAndPixels')] public function it_can_have_a_modal_with_different_max_widths($size, $expectedWidth) { $this->browse(function (Browser $browser) use ($size, $expectedWidth) { @@ -244,11 +241,8 @@ public function it_can_have_a_modal_with_different_max_widths($size, $expectedWi }); } - /** - * @test - * - * @dataProvider sizeAndPixels - */ + #[\PHPUnit\Framework\Attributes\Test] + #[\PHPUnit\Framework\Attributes\DataProvider('sizeAndPixels')] public function it_can_have_a_slideover_with_different_max_widths($size, $expectedWidth) { $this->browse(function (Browser $browser) use ($size, $expectedWidth) { diff --git a/app/tests/Browser/NavigationTest.php b/app/tests/Browser/NavigationTest.php index b9d25d37..7c029e1f 100644 --- a/app/tests/Browser/NavigationTest.php +++ b/app/tests/Browser/NavigationTest.php @@ -8,7 +8,7 @@ class NavigationTest extends DuskTestCase { - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_navigate_without_reloading_the_whole_page() { $this->browse(function (Browser $browser) { @@ -26,7 +26,7 @@ public function it_can_navigate_without_reloading_the_whole_page() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_navigate_with_a_hash() { $this->browse(function (Browser $browser) { @@ -42,7 +42,7 @@ public function it_can_navigate_with_a_hash() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_redirect_without_reloading_the_whole_page() { $this->browse(function (Browser $browser) { @@ -56,7 +56,7 @@ public function it_can_redirect_without_reloading_the_whole_page() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_redirect_away_from_the_splade_spa() { $this->browse(function (Browser $browser) { @@ -68,7 +68,7 @@ public function it_can_redirect_away_from_the_splade_spa() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_redirect_away_from_the_splade_spa_with_a_helper_method() { $this->browse(function (Browser $browser) { @@ -80,7 +80,7 @@ public function it_can_redirect_away_from_the_splade_spa_with_a_helper_method() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_redirect_away_from_the_splade_spa_with_the_link_component() { $this->browse(function (Browser $browser) { @@ -92,7 +92,7 @@ public function it_can_redirect_away_from_the_splade_spa_with_the_link_component }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_use_the_back_and_forward_buttons() { $this->browse(function (Browser $browser) { @@ -118,7 +118,7 @@ public function it_can_use_the_back_and_forward_buttons() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_remembers_the_state_of_a_page() { $this->browse(function (Browser $browser) { @@ -134,7 +134,7 @@ public function it_remembers_the_state_of_a_page() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_ask_to_confirm() { $this->browse(function (Browser $browser) { @@ -153,7 +153,7 @@ public function it_can_ask_to_confirm() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_ask_to_confirm_with_a_password() { $this->browse(function (Browser $browser) { @@ -179,7 +179,7 @@ public function it_can_ask_to_confirm_with_a_password() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_ask_to_confirm_with_custom_texts() { $this->browse(function (Browser $browser) { @@ -193,7 +193,7 @@ public function it_can_ask_to_confirm_with_custom_texts() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_shows_a_404_error() { $this->browse(function (Browser $browser) { @@ -219,7 +219,7 @@ public function it_shows_a_404_error() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_shows_a_500_error() { $this->browse(function (Browser $browser) { @@ -237,7 +237,7 @@ public function it_shows_a_500_error() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_use_a_blade_link_component() { $this->browse(function (Browser $browser) { @@ -249,7 +249,7 @@ public function it_can_use_a_blade_link_component() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_use_additional_attributes_on_a_blade_link_component() { $this->browse(function (Browser $browser) { @@ -264,7 +264,7 @@ public function it_can_use_additional_attributes_on_a_blade_link_component() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_use_the_link_component_to_post_data() { $this->browse(function (Browser $browser) { @@ -276,7 +276,7 @@ public function it_can_use_the_link_component_to_post_data() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_use_the_link_component_to_put_data() { $this->browse(function (Browser $browser) { @@ -288,7 +288,7 @@ public function it_can_use_the_link_component_to_put_data() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_adds_a_vary_header_so_switching_between_spa_and_non_spa_wont_break() { $this->browse(function (Browser $browser) { diff --git a/app/tests/Browser/PersistentLayoutTest.php b/app/tests/Browser/PersistentLayoutTest.php index cb234c8c..77f6a03c 100644 --- a/app/tests/Browser/PersistentLayoutTest.php +++ b/app/tests/Browser/PersistentLayoutTest.php @@ -7,7 +7,7 @@ class PersistentLayoutTest extends DuskTestCase { - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_navigate_without_reloading_the_layout() { $this->browse(function (Browser $browser) { @@ -31,7 +31,7 @@ public function it_can_navigate_without_reloading_the_layout() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_doesnt_mess_with_nested_components() { $this->browse(function (Browser $browser) { @@ -46,7 +46,7 @@ public function it_doesnt_mess_with_nested_components() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_keep_the_dynamic_components_alive_when_navigating() { $this->browse(function (Browser $browser) { @@ -73,7 +73,7 @@ public function it_can_keep_the_dynamic_components_alive_when_navigating() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_navigate_and_keep_the_global_data_store_binding() { $this->browse(function (Browser $browser) { diff --git a/app/tests/Browser/PreloadedModalTest.php b/app/tests/Browser/PreloadedModalTest.php index cf5f1483..85d6eecc 100644 --- a/app/tests/Browser/PreloadedModalTest.php +++ b/app/tests/Browser/PreloadedModalTest.php @@ -7,7 +7,7 @@ class PreloadedModalTest extends DuskTestCase { - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_show_a_preloaded_modal() { $this->browse(function (Browser $browser) { @@ -29,7 +29,7 @@ public function it_can_show_a_preloaded_modal() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_show_a_preloaded_modal_without_a_trigger() { $this->browse(function (Browser $browser) { @@ -44,7 +44,7 @@ public function it_can_show_a_preloaded_modal_without_a_trigger() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_show_a_preloaded_slideover() { $this->browse(function (Browser $browser) { @@ -66,7 +66,7 @@ public function it_can_show_a_preloaded_slideover() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_show_a_large_preloaded_modal() { $this->browse(function (Browser $browser) { @@ -88,7 +88,7 @@ public function it_can_show_a_large_preloaded_modal() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_disable_closing_the_model_implicitly() { $this->browse(function (Browser $browser) { @@ -107,7 +107,7 @@ public function it_can_disable_closing_the_model_implicitly() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_show_a_large_preloaded_slideover() { $this->browse(function (Browser $browser) { diff --git a/app/tests/Browser/PreserveScrollTest.php b/app/tests/Browser/PreserveScrollTest.php index afda8c98..28013641 100644 --- a/app/tests/Browser/PreserveScrollTest.php +++ b/app/tests/Browser/PreserveScrollTest.php @@ -7,7 +7,7 @@ class PreserveScrollTest extends DuskTestCase { - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_preserve_to_scroll_props_on_navigation() { $this->browse(function (Browser $browser) { diff --git a/app/tests/Browser/RehydrateTest.php b/app/tests/Browser/RehydrateTest.php index dfdca7a7..fc19eb65 100644 --- a/app/tests/Browser/RehydrateTest.php +++ b/app/tests/Browser/RehydrateTest.php @@ -7,7 +7,7 @@ class RehydrateTest extends DuskTestCase { - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_rehydrate_by_polling() { $this->browse(function (Browser $browser) { @@ -34,7 +34,7 @@ public function it_can_rehydrate_by_polling() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_rehydrate_a_section_after_submitting_a_form() { $this->browse(function (Browser $browser) { @@ -55,7 +55,7 @@ public function it_can_rehydrate_a_section_after_submitting_a_form() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_rehydrate_two_sections_and_not_screw_up_the_progress_bar() { $this->browse(function (Browser $browser) { @@ -78,7 +78,7 @@ public function it_can_rehydrate_two_sections_and_not_screw_up_the_progress_bar( }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_rehydrate_and_keep_the_global_data_store_binding() { $this->browse(function (Browser $browser) { diff --git a/app/tests/Browser/ScriptTest.php b/app/tests/Browser/ScriptTest.php index a9ed3841..bf9f206d 100644 --- a/app/tests/Browser/ScriptTest.php +++ b/app/tests/Browser/ScriptTest.php @@ -7,7 +7,7 @@ class ScriptTest extends DuskTestCase { - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_use_a_custom_script() { $this->browse(function (Browser $browser) { diff --git a/app/tests/Browser/StateTest.php b/app/tests/Browser/StateTest.php index 927b53e4..213844a8 100644 --- a/app/tests/Browser/StateTest.php +++ b/app/tests/Browser/StateTest.php @@ -7,7 +7,7 @@ class StateTest extends DuskTestCase { - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_show_errors_and_flash_and_shared_data() { $this->browse(function (Browser $browser) { diff --git a/app/tests/Browser/Table/AutoFillTest.php b/app/tests/Browser/Table/AutoFillTest.php index ff19ad7f..7d03946b 100644 --- a/app/tests/Browser/Table/AutoFillTest.php +++ b/app/tests/Browser/Table/AutoFillTest.php @@ -7,16 +7,11 @@ use Laravel\Dusk\Browser; use Tests\DuskTestCase; -/** - * @group table - */ +#[\PHPUnit\Framework\Attributes\Group('table')] class AutoFillTest extends DuskTestCase { - /** - * @test - * - * @dataProvider tableUrls - */ + #[\PHPUnit\Framework\Attributes\Test] + #[\PHPUnit\Framework\Attributes\DataProvider('tableUrls')] public function it_generates_the_table_header_with_sort_buttons($url) { $this->browse(function (Browser $browser) use ($url) { @@ -35,11 +30,8 @@ public function it_generates_the_table_header_with_sort_buttons($url) }); } - /** - * @test - * - * @dataProvider tableUrls - */ + #[\PHPUnit\Framework\Attributes\Test] + #[\PHPUnit\Framework\Attributes\DataProvider('tableUrls')] public function it_generates_the_table_body_with_a_custom_action_column($url) { $this->browse(function (Browser $browser) use ($url) { diff --git a/app/tests/Browser/Table/BulkActionTest.php b/app/tests/Browser/Table/BulkActionTest.php index 0dfedc2a..62e5c41d 100644 --- a/app/tests/Browser/Table/BulkActionTest.php +++ b/app/tests/Browser/Table/BulkActionTest.php @@ -7,12 +7,10 @@ use Laravel\Dusk\Browser; use Tests\DuskTestCase; -/** - * @group table - */ +#[\PHPUnit\Framework\Attributes\Group('table')] class BulkActionTest extends DuskTestCase { - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_perform_one_row() { $this->browse(function (Browser $browser) { @@ -41,7 +39,7 @@ public function it_can_perform_one_row() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_perform_one_all_rows_on_the_current_page_with_a_confirmation() { $this->browse(function (Browser $browser) { @@ -72,7 +70,7 @@ public function it_can_perform_one_all_rows_on_the_current_page_with_a_confirmat }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_perform_one_all_rows_on_the_current_page_with_a_password_confirmation() { $this->browse(function (Browser $browser) { @@ -100,7 +98,7 @@ public function it_can_perform_one_all_rows_on_the_current_page_with_a_password_ }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_perform_on_all_rows_of_the_filtered_result() { $this->browse(function (Browser $browser) { @@ -134,7 +132,7 @@ public function it_can_perform_on_all_rows_of_the_filtered_result() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_perform_one_all_rows_on_the_all_pages_with_a_custom_confirmation() { $this->browse(function (Browser $browser) { diff --git a/app/tests/Browser/Table/CaseTest.php b/app/tests/Browser/Table/CaseTest.php index ea7701ae..4115a5bd 100644 --- a/app/tests/Browser/Table/CaseTest.php +++ b/app/tests/Browser/Table/CaseTest.php @@ -8,16 +8,11 @@ use Laravel\Dusk\Browser; use Tests\DuskTestCase; -/** - * @group table - */ +#[\PHPUnit\Framework\Attributes\Group('table')] class CaseTest extends DuskTestCase { - /** - * @test - * - * @dataProvider booleanDataset - */ + #[\PHPUnit\Framework\Attributes\Test] + #[\PHPUnit\Framework\Attributes\DataProvider('booleanDataset')] public function it_can_search_case_insensitive($spladeQueryBuilder) { $this->browse(function (Browser $browser) use ($spladeQueryBuilder) { @@ -36,11 +31,8 @@ public function it_can_search_case_insensitive($spladeQueryBuilder) }); } - /** - * @test - * - * @dataProvider booleanDataset - */ + #[\PHPUnit\Framework\Attributes\Test] + #[\PHPUnit\Framework\Attributes\DataProvider('booleanDataset')] public function it_can_search_case_sensitive($spladeQueryBuilder) { if (DB::connection() instanceof SQLiteConnection) { diff --git a/app/tests/Browser/Table/ColumnTest.php b/app/tests/Browser/Table/ColumnTest.php index 83dbe4e8..fead5536 100644 --- a/app/tests/Browser/Table/ColumnTest.php +++ b/app/tests/Browser/Table/ColumnTest.php @@ -6,16 +6,11 @@ use Laravel\Dusk\Browser; use Tests\DuskTestCase; -/** - * @group table - */ +#[\PHPUnit\Framework\Attributes\Group('table')] class ColumnTest extends DuskTestCase { - /** - * @test - * - * @dataProvider tableUrls - */ + #[\PHPUnit\Framework\Attributes\Test] + #[\PHPUnit\Framework\Attributes\DataProvider('tableUrls')] public function it_can_toggle_columns($url) { $this->browse(function (Browser $browser) use ($url) { diff --git a/app/tests/Browser/Table/CustomTest.php b/app/tests/Browser/Table/CustomTest.php index 62d7ded4..bae92c8c 100644 --- a/app/tests/Browser/Table/CustomTest.php +++ b/app/tests/Browser/Table/CustomTest.php @@ -6,16 +6,11 @@ use Laravel\Dusk\Browser; use Tests\DuskTestCase; -/** - * @group table - */ +#[\PHPUnit\Framework\Attributes\Group('table')] class CustomTest extends DuskTestCase { - /** - * @test - * - * @dataProvider booleanDataset - */ + #[\PHPUnit\Framework\Attributes\Test] + #[\PHPUnit\Framework\Attributes\DataProvider('booleanDataset')] public function it_can_provide_a_custom_head_and_body($spladeQueryBuilder) { $this->browse(function (Browser $browser) use ($spladeQueryBuilder) { diff --git a/app/tests/Browser/Table/DropdownTest.php b/app/tests/Browser/Table/DropdownTest.php index eaaf1aa1..ffa29c11 100644 --- a/app/tests/Browser/Table/DropdownTest.php +++ b/app/tests/Browser/Table/DropdownTest.php @@ -6,16 +6,11 @@ use Laravel\Dusk\Browser; use Tests\DuskTestCase; -/** - * @group table - */ +#[\PHPUnit\Framework\Attributes\Group('table')] class DropdownTest extends DuskTestCase { - /** - * @test - * - * @dataProvider booleanDataset - */ + #[\PHPUnit\Framework\Attributes\Test] + #[\PHPUnit\Framework\Attributes\DataProvider('booleanDataset')] public function it_renders_the_dropdown_outside_of_the_table_wrapper($spladeQueryBuilder) { $this->browse(function (Browser $browser) use ($spladeQueryBuilder) { diff --git a/app/tests/Browser/Table/EmptyTest.php b/app/tests/Browser/Table/EmptyTest.php index 8a378373..b414c597 100644 --- a/app/tests/Browser/Table/EmptyTest.php +++ b/app/tests/Browser/Table/EmptyTest.php @@ -5,14 +5,10 @@ use Laravel\Dusk\Browser; use Tests\DuskTestCase; -/** - * @group table - */ +#[\PHPUnit\Framework\Attributes\Group('table')] class EmptyTest extends DuskTestCase { - /** - * @test - */ + #[\PHPUnit\Framework\Attributes\Test] public function it_shows_a_text_when_no_results_have_been_found() { $this->browse(function (Browser $browser) { diff --git a/app/tests/Browser/Table/ExportTest.php b/app/tests/Browser/Table/ExportTest.php index 1c2bab02..519c3df9 100644 --- a/app/tests/Browser/Table/ExportTest.php +++ b/app/tests/Browser/Table/ExportTest.php @@ -6,12 +6,10 @@ use Laravel\Dusk\Browser; use Tests\DuskTestCase; -/** - * @group table - */ +#[\PHPUnit\Framework\Attributes\Group('table')] class ExportTest extends DuskTestCase { - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_export_as_excel() { $this->browse(function (Browser $browser) { @@ -31,7 +29,7 @@ public function it_can_export_as_excel() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_export_as_csv() { $this->browse(function (Browser $browser) { diff --git a/app/tests/Browser/Table/FilterTest.php b/app/tests/Browser/Table/FilterTest.php index e1130e06..92783517 100644 --- a/app/tests/Browser/Table/FilterTest.php +++ b/app/tests/Browser/Table/FilterTest.php @@ -6,16 +6,11 @@ use Laravel\Dusk\Browser; use Tests\DuskTestCase; -/** - * @group table - */ +#[\PHPUnit\Framework\Attributes\Group('table')] class FilterTest extends DuskTestCase { - /** - * @test - * - * @dataProvider tableUrls - */ + #[\PHPUnit\Framework\Attributes\Test] + #[\PHPUnit\Framework\Attributes\DataProvider('tableUrls')] public function it_can_use_select_filters($url) { $this->browse(function (Browser $browser) use ($url) { @@ -38,11 +33,8 @@ public function it_can_use_select_filters($url) }); } - /** - * @test - * - * @dataProvider booleanDataset - */ + #[\PHPUnit\Framework\Attributes\Test] + #[\PHPUnit\Framework\Attributes\DataProvider('booleanDataset')] public function it_can_provide_a_callback_to_transform_the_value($spladeQueryBuilder) { $this->browse(function (Browser $browser) use ($spladeQueryBuilder) { @@ -58,11 +50,8 @@ public function it_can_provide_a_callback_to_transform_the_value($spladeQueryBui }); } - /** - * @test - * - * @dataProvider booleanDataset - */ + #[\PHPUnit\Framework\Attributes\Test] + #[\PHPUnit\Framework\Attributes\DataProvider('booleanDataset')] public function it_can_use_boolean_keys_for_the_filter_options($spladeQueryBuilder) { $this->browse(function (Browser $browser) use ($spladeQueryBuilder) { diff --git a/app/tests/Browser/Table/GlobalSearchTest.php b/app/tests/Browser/Table/GlobalSearchTest.php index 58f33ff6..94cff146 100644 --- a/app/tests/Browser/Table/GlobalSearchTest.php +++ b/app/tests/Browser/Table/GlobalSearchTest.php @@ -6,16 +6,11 @@ use Laravel\Dusk\Browser; use Tests\DuskTestCase; -/** - * @group table - */ +#[\PHPUnit\Framework\Attributes\Group('table')] class GlobalSearchTest extends DuskTestCase { - /** - * @test - * - * @dataProvider tableUrls - */ + #[\PHPUnit\Framework\Attributes\Test] + #[\PHPUnit\Framework\Attributes\DataProvider('tableUrls')] public function it_can_globally_search($url) { $this->browse(function (Browser $browser) use ($url) { @@ -42,11 +37,8 @@ public function it_can_globally_search($url) }); } - /** - * @test - * - * @dataProvider tableUrls - */ + #[\PHPUnit\Framework\Attributes\Test] + #[\PHPUnit\Framework\Attributes\DataProvider('tableUrls')] public function it_resets_the_page_on_search($url) { $this->browse(function (Browser $browser) use ($url) { diff --git a/app/tests/Browser/Table/InputSearchTest.php b/app/tests/Browser/Table/InputSearchTest.php index 12ad7d62..84bf2db9 100644 --- a/app/tests/Browser/Table/InputSearchTest.php +++ b/app/tests/Browser/Table/InputSearchTest.php @@ -6,16 +6,11 @@ use Laravel\Dusk\Browser; use Tests\DuskTestCase; -/** - * @group table - */ +#[\PHPUnit\Framework\Attributes\Group('table')] class InputSearchTest extends DuskTestCase { - /** - * @test - * - * @dataProvider tableUrls - */ + #[\PHPUnit\Framework\Attributes\Test] + #[\PHPUnit\Framework\Attributes\DataProvider('tableUrls')] public function it_can_search_by_name_or_email($url) { $this->browse(function (Browser $browser) use ($url) { @@ -46,11 +41,8 @@ public function it_can_search_by_name_or_email($url) }); } - /** - * @test - * - * @dataProvider tableUrls - */ + #[\PHPUnit\Framework\Attributes\Test] + #[\PHPUnit\Framework\Attributes\DataProvider('tableUrls')] public function it_doesnt_remove_the_search_input_when_the_field_is_cleared($url) { $this->browse(function (Browser $browser) use ($url) { diff --git a/app/tests/Browser/Table/ModalTest.php b/app/tests/Browser/Table/ModalTest.php index 0d29764d..74dbe88b 100644 --- a/app/tests/Browser/Table/ModalTest.php +++ b/app/tests/Browser/Table/ModalTest.php @@ -6,14 +6,10 @@ use Laravel\Dusk\Browser; use Tests\DuskTestCase; -/** - * @group table - */ +#[\PHPUnit\Framework\Attributes\Group('table')] class ModalTest extends DuskTestCase { - /** - * @test - */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_paginate_in_a_modal_without_closing_the_modal() { $this->browse(function (Browser $browser) { @@ -37,9 +33,7 @@ public function it_can_paginate_in_a_modal_without_closing_the_modal() }); } - /** - * @test - */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_order_in_a_modal_without_closing_the_modal() { $this->browse(function (Browser $browser) { @@ -68,9 +62,7 @@ public function it_can_order_in_a_modal_without_closing_the_modal() }); } - /** - * @test - */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_search_in_a_modal_without_closing_the_modal() { $this->browse(function (Browser $browser) { diff --git a/app/tests/Browser/Table/PaginationTest.php b/app/tests/Browser/Table/PaginationTest.php index 7da47dc6..ae1c3a22 100644 --- a/app/tests/Browser/Table/PaginationTest.php +++ b/app/tests/Browser/Table/PaginationTest.php @@ -6,9 +6,7 @@ use Laravel\Dusk\Browser; use Tests\DuskTestCase; -/** - * @group table - */ +#[\PHPUnit\Framework\Attributes\Group('table')] class PaginationTest extends DuskTestCase { public static function simpleUrls() @@ -21,11 +19,8 @@ public static function simpleUrls() ]; } - /** - * @test - * - * @dataProvider tableUrls - */ + #[\PHPUnit\Framework\Attributes\Test] + #[\PHPUnit\Framework\Attributes\DataProvider('tableUrls')] public function it_generates_a_paginator_with_links($url) { $this->browse(function (Browser $browser) use ($url) { @@ -85,11 +80,8 @@ public function it_generates_a_paginator_with_links($url) }); } - /** - * @test - * - * @dataProvider booleanDataset - */ + #[\PHPUnit\Framework\Attributes\Test] + #[\PHPUnit\Framework\Attributes\DataProvider('booleanDataset')] public function it_disabled_the_per_page_selection_on_less_than_two_options($spladeQueryBuilder) { $this->browse(function (Browser $browser) use ($spladeQueryBuilder) { @@ -105,11 +97,8 @@ public function it_disabled_the_per_page_selection_on_less_than_two_options($spl }); } - /** - * @test - * - * @dataProvider simpleUrls - */ + #[\PHPUnit\Framework\Attributes\Test] + #[\PHPUnit\Framework\Attributes\DataProvider('simpleUrls')] public function it_generates_a_simple_paginator($url, $method) { $url .= $method; diff --git a/app/tests/Browser/Table/PreserveScrollTest.php b/app/tests/Browser/Table/PreserveScrollTest.php index 0e2d2031..51176178 100644 --- a/app/tests/Browser/Table/PreserveScrollTest.php +++ b/app/tests/Browser/Table/PreserveScrollTest.php @@ -6,14 +6,10 @@ use Laravel\Dusk\Browser; use Tests\DuskTestCase; -/** - * @group table - */ +#[\PHPUnit\Framework\Attributes\Group('table')] class PreserveScrollTest extends DuskTestCase { - /** - * @test - */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_preserve_the_scroll_value_with_a_form_component() { return $this->markTestSkipped('Breaks in CI'); @@ -43,9 +39,7 @@ public function it_can_preserve_the_scroll_value_with_a_form_component() }); } - /** - * @test - */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_preserve_the_scroll_value_with_a_link_component() { return $this->markTestSkipped('Breaks in CI'); diff --git a/app/tests/Browser/Table/RelationsTest.php b/app/tests/Browser/Table/RelationsTest.php index 16c85b11..b450f27c 100644 --- a/app/tests/Browser/Table/RelationsTest.php +++ b/app/tests/Browser/Table/RelationsTest.php @@ -8,16 +8,11 @@ use Laravel\Dusk\Browser; use Tests\DuskTestCase; -/** - * @group table - */ +#[\PHPUnit\Framework\Attributes\Group('table')] class RelationsTest extends DuskTestCase { - /** - * @test - * - * @dataProvider booleanDataset - */ + #[\PHPUnit\Framework\Attributes\Test] + #[\PHPUnit\Framework\Attributes\DataProvider('booleanDataset')] public function it_can_search_through_a_nested_relationship($spatieQueryBuilder) { $this->browse(function (Browser $browser) use ($spatieQueryBuilder) { @@ -38,11 +33,8 @@ public function it_can_search_through_a_nested_relationship($spatieQueryBuilder) }); } - /** - * @test - * - * @dataProvider booleanDataset - */ + #[\PHPUnit\Framework\Attributes\Test] + #[\PHPUnit\Framework\Attributes\DataProvider('booleanDataset')] public function it_can_search_through_a_nested_relationship_using_global_search($spatieQueryBuilder) { $this->browse(function (Browser $browser) use ($spatieQueryBuilder) { @@ -74,11 +66,8 @@ public function it_can_search_through_a_nested_relationship_using_global_search( }); } - /** - * @test - * - * @dataProvider booleanDataset - */ + #[\PHPUnit\Framework\Attributes\Test] + #[\PHPUnit\Framework\Attributes\DataProvider('booleanDataset')] public function it_can_order_by_a_relationship($spatieQueryBuilder) { if ($spatieQueryBuilder) { diff --git a/app/tests/Browser/Table/ResetTest.php b/app/tests/Browser/Table/ResetTest.php index d8a17969..83bca591 100644 --- a/app/tests/Browser/Table/ResetTest.php +++ b/app/tests/Browser/Table/ResetTest.php @@ -6,16 +6,11 @@ use Laravel\Dusk\Browser; use Tests\DuskTestCase; -/** - * @group table - */ +#[\PHPUnit\Framework\Attributes\Group('table')] class ResetTest extends DuskTestCase { - /** - * @test - * - * @dataProvider tableUrls - */ + #[\PHPUnit\Framework\Attributes\Test] + #[\PHPUnit\Framework\Attributes\DataProvider('tableUrls')] public function it_can_reset_toggled_columns($url) { $this->browse(function (Browser $browser) use ($url) { @@ -35,11 +30,8 @@ public function it_can_reset_toggled_columns($url) }); } - /** - * @test - * - * @dataProvider tableUrls - */ + #[\PHPUnit\Framework\Attributes\Test] + #[\PHPUnit\Framework\Attributes\DataProvider('tableUrls')] public function it_can_reset_select_filters($url) { $this->browse(function (Browser $browser) use ($url) { @@ -65,11 +57,8 @@ public function it_can_reset_select_filters($url) }); } - /** - * @test - * - * @dataProvider tableUrls - */ + #[\PHPUnit\Framework\Attributes\Test] + #[\PHPUnit\Framework\Attributes\DataProvider('tableUrls')] public function it_can_reset_global_search($url) { $this->browse(function (Browser $browser) use ($url) { @@ -95,11 +84,8 @@ public function it_can_reset_global_search($url) }); } - /** - * @test - * - * @dataProvider tableUrls - */ + #[\PHPUnit\Framework\Attributes\Test] + #[\PHPUnit\Framework\Attributes\DataProvider('tableUrls')] public function it_can_reset_search_inputs($url) { $this->browse(function (Browser $browser) use ($url) { @@ -127,11 +113,8 @@ public function it_can_reset_search_inputs($url) }); } - /** - * @test - * - * @dataProvider tableUrls - */ + #[\PHPUnit\Framework\Attributes\Test] + #[\PHPUnit\Framework\Attributes\DataProvider('tableUrls')] public function it_can_reset_the_sort($url) { $this->browse(function (Browser $browser) use ($url) { @@ -162,11 +145,8 @@ public function it_can_reset_the_sort($url) }); } - /** - * @test - * - * @dataProvider tableUrls - */ + #[\PHPUnit\Framework\Attributes\Test] + #[\PHPUnit\Framework\Attributes\DataProvider('tableUrls')] public function it_can_reset_to_the_first_page($url) { $this->browse(function (Browser $browser) use ($url) { diff --git a/app/tests/Browser/Table/RowLinkTest.php b/app/tests/Browser/Table/RowLinkTest.php index c2938d75..2a5def83 100644 --- a/app/tests/Browser/Table/RowLinkTest.php +++ b/app/tests/Browser/Table/RowLinkTest.php @@ -6,16 +6,11 @@ use Laravel\Dusk\Browser; use Tests\DuskTestCase; -/** - * @group table - */ +#[\PHPUnit\Framework\Attributes\Group('table')] class RowLinkTest extends DuskTestCase { - /** - * @test - * - * @dataProvider booleanDataset - */ + #[\PHPUnit\Framework\Attributes\Test] + #[\PHPUnit\Framework\Attributes\DataProvider('booleanDataset')] public function it_can_make_a_row_clickable($spladeQueryBuilder) { $this->browse(function (Browser $browser) use ($spladeQueryBuilder) { @@ -31,11 +26,8 @@ public function it_can_make_a_row_clickable($spladeQueryBuilder) }); } - /** - * @test - * - * @dataProvider booleanDataset - */ + #[\PHPUnit\Framework\Attributes\Test] + #[\PHPUnit\Framework\Attributes\DataProvider('booleanDataset')] public function it_can_make_a_row_clickable_and_open_a_modal($spladeQueryBuilder) { $this->browse(function (Browser $browser) use ($spladeQueryBuilder) { @@ -46,11 +38,8 @@ public function it_can_make_a_row_clickable_and_open_a_modal($spladeQueryBuilder }); } - /** - * @test - * - * @dataProvider booleanDataset - */ + #[\PHPUnit\Framework\Attributes\Test] + #[\PHPUnit\Framework\Attributes\DataProvider('booleanDataset')] public function it_can_make_a_row_clickable_and_open_a_slideover($spladeQueryBuilder) { $this->browse(function (Browser $browser) use ($spladeQueryBuilder) { diff --git a/app/tests/Browser/Table/ScrollTest.php b/app/tests/Browser/Table/ScrollTest.php index 9dcc018b..199e426c 100644 --- a/app/tests/Browser/Table/ScrollTest.php +++ b/app/tests/Browser/Table/ScrollTest.php @@ -6,14 +6,10 @@ use Laravel\Dusk\Browser; use Tests\DuskTestCase; -/** - * @group table - */ +#[\PHPUnit\Framework\Attributes\Group('table')] class ScrollTest extends DuskTestCase { - /** - * @test - */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_preserve_the_scroll_value_when_sorting_the_table() { $this->browse(function (Browser $browser) { @@ -40,9 +36,7 @@ public function it_can_preserve_the_scroll_value_when_sorting_the_table() }); } - /** - * @test - */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_change_the_scroll_behaviour_on_pagination() { $this->browse(function (Browser $browser) { diff --git a/app/tests/Browser/Table/SortTest.php b/app/tests/Browser/Table/SortTest.php index 5dd98d2c..21183fa5 100644 --- a/app/tests/Browser/Table/SortTest.php +++ b/app/tests/Browser/Table/SortTest.php @@ -6,16 +6,11 @@ use Laravel\Dusk\Browser; use Tests\DuskTestCase; -/** - * @group table - */ +#[\PHPUnit\Framework\Attributes\Group('table')] class SortTest extends DuskTestCase { - /** - * @test - * - * @dataProvider tableUrls - */ + #[\PHPUnit\Framework\Attributes\Test] + #[\PHPUnit\Framework\Attributes\DataProvider('tableUrls')] public function it_sorts_by_name_by_default($url) { $this->browse(function (Browser $browser) use ($url) { diff --git a/app/tests/Browser/TeleportTest.php b/app/tests/Browser/TeleportTest.php index 7d8a3670..6c566030 100644 --- a/app/tests/Browser/TeleportTest.php +++ b/app/tests/Browser/TeleportTest.php @@ -7,7 +7,7 @@ class TeleportTest extends DuskTestCase { - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_teleport_a_slot() { $this->browse(function (Browser $browser) { diff --git a/app/tests/Browser/ToastTest.php b/app/tests/Browser/ToastTest.php index 44538289..0db7812f 100644 --- a/app/tests/Browser/ToastTest.php +++ b/app/tests/Browser/ToastTest.php @@ -7,7 +7,7 @@ class ToastTest extends DuskTestCase { - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_show_and_dimiss_a_toast() { $this->browse(function (Browser $browser) { @@ -26,7 +26,7 @@ public function it_can_show_and_dimiss_a_toast() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_show_two_toasts() { $this->browse(function (Browser $browser) { @@ -50,7 +50,7 @@ public function it_can_show_two_toasts() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_show_a_toast_with_a_backdrop() { $this->browse(function (Browser $browser) { @@ -69,7 +69,7 @@ public function it_can_show_a_toast_with_a_backdrop() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_show_a_toast_with_a_message() { $this->browse(function (Browser $browser) { @@ -85,7 +85,7 @@ public function it_can_show_a_toast_with_a_message() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_show_a_success_toast() { $this->browse(function (Browser $browser) { @@ -100,7 +100,7 @@ public function it_can_show_a_success_toast() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_show_a_warning_toast() { $this->browse(function (Browser $browser) { @@ -115,7 +115,7 @@ public function it_can_show_a_warning_toast() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_show_a_danger_toast() { $this->browse(function (Browser $browser) { @@ -130,7 +130,7 @@ public function it_can_show_a_danger_toast() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_show_a_center_bottom_toast() { $this->browse(function (Browser $browser) { @@ -151,7 +151,7 @@ public function it_can_show_a_center_bottom_toast() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_show_a_right_bottom_toast() { $this->browse(function (Browser $browser) { @@ -166,7 +166,7 @@ public function it_can_show_a_right_bottom_toast() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_show_a_toast_with_two_lines() { $this->browse(function (Browser $browser) { diff --git a/app/tests/Browser/ToggleTest.php b/app/tests/Browser/ToggleTest.php index 2ac87dc9..efbad953 100644 --- a/app/tests/Browser/ToggleTest.php +++ b/app/tests/Browser/ToggleTest.php @@ -7,7 +7,7 @@ class ToggleTest extends DuskTestCase { - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_have_a_default_value() { $this->browse(function (Browser $browser) { @@ -18,7 +18,7 @@ public function it_can_have_a_default_value() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_have_a_multiple_default_values() { $this->browse(function (Browser $browser) { @@ -31,7 +31,7 @@ public function it_can_have_a_multiple_default_values() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_toggle_a_single_element() { $this->browse(function (Browser $browser) { @@ -50,7 +50,7 @@ public function it_can_toggle_a_single_element() }); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_toggle_a_multiple_element() { $this->browse(function (Browser $browser) { diff --git a/app/tests/Browser/TransitionTest.php b/app/tests/Browser/TransitionTest.php index 820c1b1e..1fc7d91b 100644 --- a/app/tests/Browser/TransitionTest.php +++ b/app/tests/Browser/TransitionTest.php @@ -7,7 +7,7 @@ class TransitionTest extends DuskTestCase { - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_add_custom_animations() { $this->browse(function (Browser $browser) { diff --git a/app/tests/DuskTestCase.php b/app/tests/DuskTestCase.php index 735470b3..36d31dbb 100644 --- a/app/tests/DuskTestCase.php +++ b/app/tests/DuskTestCase.php @@ -9,6 +9,7 @@ use Illuminate\Support\Arr; use Illuminate\Support\Facades\Http; use Laravel\Dusk\TestCase as BaseTestCase; +use PHPUnit\Framework\Attributes\BeforeClass; use Spatie\Snapshots\MatchesSnapshots; abstract class DuskTestCase extends BaseTestCase @@ -61,10 +62,9 @@ protected function configureDownloadPath($browser, $path) /** * Prepare for Dusk test execution. * - * @beforeClass - * * @return void */ + #[BeforeClass] public static function prepare() { if (!static::runningInSail()) { diff --git a/app/tests/Feature/HeadTest.php b/app/tests/Feature/HeadTest.php index c83ab463..a087ef83 100644 --- a/app/tests/Feature/HeadTest.php +++ b/app/tests/Feature/HeadTest.php @@ -6,7 +6,7 @@ class HeadTest extends TestCase { - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_renders_the_head() { $this->get('/navigation/one') diff --git a/app/tests/Feature/LazyTest.php b/app/tests/Feature/LazyTest.php index ec75d982..f37bd783 100644 --- a/app/tests/Feature/LazyTest.php +++ b/app/tests/Feature/LazyTest.php @@ -9,7 +9,7 @@ class LazyTest extends TestCase { - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_doesnt_resolve_the_lazy_data() { $this->withoutMiddleware(SpladeMiddleware::class) @@ -20,7 +20,7 @@ public function it_doesnt_resolve_the_lazy_data() ->assertViewHas('time', ''); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_resolves_the_lazy_data_on_lazy_loading() { Carbon::setTestNow(now()); diff --git a/app/tests/Feature/SsrTest.php b/app/tests/Feature/SsrTest.php index a0c7ea2c..f66c7115 100644 --- a/app/tests/Feature/SsrTest.php +++ b/app/tests/Feature/SsrTest.php @@ -10,7 +10,7 @@ class SsrTest extends TestCase { - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_has_a_server_that_handles_ssr_requests() { if (!config('splade.ssr.enabled')) { @@ -33,7 +33,7 @@ public function it_has_a_server_that_handles_ssr_requests() $this->assertStringContainsString('grid grid-cols-3 grid-flow-row-3', $data['body'] ?? ''); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_has_a_server_that_handles_ssr_requests_and_dynamic_content() { if (!config('splade.ssr.enabled')) { diff --git a/app/tests/Unit/BladeDirectivesTest.php b/app/tests/Unit/BladeDirectivesTest.php index 6ee18f13..288b3a28 100644 --- a/app/tests/Unit/BladeDirectivesTest.php +++ b/app/tests/Unit/BladeDirectivesTest.php @@ -7,7 +7,7 @@ class BladeDirectivesTest extends TestCase { - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_parses_the_expression_into_a_name_and_function() { [$name, $function] = BladeDirectives::parseTableCellDirectiveExpression("'action', \$user"); @@ -16,7 +16,7 @@ public function it_parses_the_expression_into_a_name_and_function() $this->assertEquals('function ($user) use ($__env)', $function); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_parses_the_expression_without_a_second_argument() { [$name, $function] = BladeDirectives::parseTableCellDirectiveExpression("'action'"); @@ -25,7 +25,7 @@ public function it_parses_the_expression_without_a_second_argument() $this->assertEquals('function () use ($__env)', $function); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_parses_the_expression_into_a_name_and_function_and_you_can_use_the_key() { [$name, $function] = BladeDirectives::parseTableCellDirectiveExpression("'action', \$user, \$key"); @@ -34,7 +34,7 @@ public function it_parses_the_expression_into_a_name_and_function_and_you_can_us $this->assertEquals('function ($user, $key) use ($__env)', $function); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_parses_the_expression_into_a_name_and_function_and_use_a_variable_from_outside_the_scope() { [$name, $function] = BladeDirectives::parseTableCellDirectiveExpression("'action', [\$user], \$account"); diff --git a/app/tests/Unit/Bridge/ComponentControllerTest.php b/app/tests/Unit/Bridge/ComponentControllerTest.php index 49cb3714..912d6f13 100644 --- a/app/tests/Unit/Bridge/ComponentControllerTest.php +++ b/app/tests/Unit/Bridge/ComponentControllerTest.php @@ -31,7 +31,7 @@ private function dataForComponent(Component $component): array return $data; } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_aborts_when_the_request_is_incomplete() { $this->post(route('splade.withVueBridge')) @@ -39,7 +39,7 @@ public function it_aborts_when_the_request_is_incomplete() ->assertSee('Invalid request'); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_aborts_when_the_request_has_no_valid_signature() { $component = new DummyComponent; @@ -53,7 +53,7 @@ public function it_aborts_when_the_request_has_no_valid_signature() ->assertSee('Malicious request'); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_aborts_when_it_cant_resolve_the_instance() { $component = new DummyComponent; @@ -68,7 +68,7 @@ public function it_aborts_when_it_cant_resolve_the_instance() ->assertSee('Component not found'); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_applies_the_original_middleware() { $component = new DummyComponent; @@ -82,7 +82,7 @@ public function it_applies_the_original_middleware() ->assertRedirectToRoute('login'); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_makes_sure_the_component_method_exists() { $component = new DummyComponent; @@ -98,7 +98,7 @@ public function it_makes_sure_the_component_method_exists() ->assertSee('Method not found'); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_calls_the_method_without_parameters() { $component = new DummyComponent; @@ -116,7 +116,7 @@ public function it_calls_the_method_without_parameters() $this->assertEquals('Tailwind', $instance->name); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_calls_the_method_with_a_parameter() { $component = new DummyComponent; diff --git a/app/tests/Unit/Bridge/ComponentMiddlewareTest.php b/app/tests/Unit/Bridge/ComponentMiddlewareTest.php index e491aaf0..018f2d3e 100644 --- a/app/tests/Unit/Bridge/ComponentMiddlewareTest.php +++ b/app/tests/Unit/Bridge/ComponentMiddlewareTest.php @@ -9,7 +9,7 @@ class ComponentMiddlewareTest extends TestCase { - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_resolves_the_route_middleware() { $service = new ComponentMiddleware; @@ -22,7 +22,7 @@ public function it_resolves_the_route_middleware() $this->assertEquals(HandleSpladeFileUploads::class . ':avatar', $middleware[0]); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_substitutes_the_original_bindings() { $service = new ComponentMiddleware; diff --git a/app/tests/Unit/Bridge/ComponentStateTest.php b/app/tests/Unit/Bridge/ComponentStateTest.php index 873f8ee7..a8e5c1b7 100644 --- a/app/tests/Unit/Bridge/ComponentStateTest.php +++ b/app/tests/Unit/Bridge/ComponentStateTest.php @@ -21,7 +21,7 @@ private function makeRequest(string $encodedInstance, string $url, string $verb) ]); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_generate_and_validate_signatures() { $instance = new ComponentState; @@ -40,7 +40,7 @@ public function it_can_generate_and_validate_signatures() $this->assertFalse($instance->requestHasValidSignature($request, 'signature')); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_throws_an_exception_when_the_component_can_not_be_resolved() { $instance = new ComponentState; @@ -56,7 +56,7 @@ public function it_throws_an_exception_when_the_component_can_not_be_resolved() $this->fail('The exception was not thrown.'); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_resolve_an_encrypted_component_from_the_request() { $service = new ComponentState; @@ -74,7 +74,7 @@ public function it_can_resolve_an_encrypted_component_from_the_request() $this->assertEquals($instance, $decrypted); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_resolve_an_encrypted_component_from_the_request_and_merge_the_given_props() { $service = new ComponentState; diff --git a/app/tests/Unit/CleanupTemporaryFileUploadsTest.php b/app/tests/Unit/CleanupTemporaryFileUploadsTest.php index 0fe225ad..52b122ed 100644 --- a/app/tests/Unit/CleanupTemporaryFileUploadsTest.php +++ b/app/tests/Unit/CleanupTemporaryFileUploadsTest.php @@ -12,7 +12,7 @@ class CleanupTemporaryFileUploadsTest extends TestCase { - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_will_clean_files_older_than_one_hour() { Storage::fake('local'); diff --git a/app/tests/Unit/ExistingFileTest.php b/app/tests/Unit/ExistingFileTest.php index 872fa655..ba9ab7ff 100644 --- a/app/tests/Unit/ExistingFileTest.php +++ b/app/tests/Unit/ExistingFileTest.php @@ -11,7 +11,7 @@ class ExistingFileTest extends TestCase { - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_load_a_file_from_a_public_disk() { $file = ExistingFile::fromDisk('public')->get('1.jpeg'); @@ -35,7 +35,7 @@ public function it_can_load_a_file_from_a_public_disk() ], $file->toArray()); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_load_a_file_from_a_public_disk_and_generate_a_temporary_url_for_the_preview() { Storage::fake('s3'); @@ -47,7 +47,7 @@ public function it_can_load_a_file_from_a_public_disk_and_generate_a_temporary_u $this->assertStringContainsString('?expiration=', $file->previewUrl); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_load_a_file_from_a_disk_without_a_preview() { $file = ExistingFile::fromDiskWithoutPreview('public')->get('1.jpeg'); @@ -70,7 +70,7 @@ public function it_can_load_a_file_from_a_disk_without_a_preview() ], $file->toArray()); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_throws_an_exception_if_the_file_does_not_exist() { try { @@ -82,7 +82,7 @@ public function it_throws_an_exception_if_the_file_does_not_exist() $this->fail('The file does not exist, but no exception was thrown.'); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_load_multiple_files_at_once() { $files = ExistingFile::fromDisk('public')->get([ @@ -96,7 +96,7 @@ public function it_can_load_multiple_files_at_once() $this->assertEquals('2.jpeg', $files[1]->name); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_serialize_the_instance_and_make_an_instance_out_of_it() { $file = ExistingFile::fromDisk('public')->get('1.jpeg')->metadata([ @@ -110,7 +110,7 @@ public function it_can_serialize_the_instance_and_make_an_instance_out_of_it() $this->assertEquals($file, $file2); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_load_a_file_from_the_spatie_media_library() { $user = User::firstOrFail(); @@ -122,7 +122,7 @@ public function it_can_load_a_file_from_the_spatie_media_library() $this->assertTrue($file->getModel()->is($singleMedia)); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_load_a_file_from_the_spatie_media_library_with_a_different_preview_conversion() { $user = User::firstOrFail(); @@ -134,7 +134,7 @@ public function it_can_load_a_file_from_the_spatie_media_library_with_a_differen $this->assertStringContainsString('-thumb.', $file->previewUrl); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_load_multiple_files_from_the_spatie_media_library() { $user = User::firstOrFail(); diff --git a/app/tests/Unit/HeadTest.php b/app/tests/Unit/HeadTest.php index e1446ce9..26c4ed7a 100644 --- a/app/tests/Unit/HeadTest.php +++ b/app/tests/Unit/HeadTest.php @@ -8,7 +8,7 @@ class HeadTest extends TestCase { - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_trims_the_title() { $head = new Head; @@ -17,7 +17,7 @@ public function it_trims_the_title() $this->assertEquals('Laravel Splade', $head->getTitle()); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_prepends_the_prefix() { config(['splade.seo.title_prefix' => 'Prefix']); @@ -32,7 +32,7 @@ public function it_prepends_the_prefix() $this->assertEquals('Prefix | Laravel Splade', $head->getTitle()); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_doesnt_prepend_the_prefix_if_its_the_same_as_the_title() { config(['splade.seo.title_prefix' => 'Laravel Splade']); @@ -48,7 +48,7 @@ public function it_doesnt_prepend_the_prefix_if_its_the_same_as_the_title() $this->assertEquals('Laravel Splade', $head->getTitle()); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_appends_the_prefix() { config(['splade.seo.title_suffix' => 'Suffix']); @@ -63,7 +63,7 @@ public function it_appends_the_prefix() $this->assertEquals('Laravel Splade | Suffix', $head->getTitle()); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_doesnt_append_the_suffix_if_its_the_same_as_the_title() { config(['splade.seo.title_suffix' => 'Laravel Splade']); @@ -79,7 +79,7 @@ public function it_doesnt_append_the_suffix_if_its_the_same_as_the_title() $this->assertEquals('Laravel Splade', $head->getTitle()); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_fill_the_twitter_defaults() { config([ @@ -97,7 +97,7 @@ public function it_can_fill_the_twitter_defaults() } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_fill_the_open_graph_defaults() { config([ @@ -111,7 +111,7 @@ public function it_can_fill_the_open_graph_defaults() $this->assertEquals($head->getMetaByProperty('og:title')->first()->content, 'Default Title'); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_fill_the_twitter_defaults_and_then_auto_fills() { config([ @@ -138,7 +138,7 @@ public function it_can_fill_the_twitter_defaults_and_then_auto_fills() $this->assertEquals($head->getMetaByName('twitter:description')->first()->content, 'Updated Description'); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_fill_the_open_graph_defaults_and_then_auto_fills() { config([ @@ -163,7 +163,7 @@ public function it_can_fill_the_open_graph_defaults_and_then_auto_fills() $this->assertEquals($head->getMetaByProperty('og:title')->first()->content, 'Updated Title'); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_render_the_canonical_link() { $head = new Head; @@ -172,7 +172,7 @@ public function it_can_render_the_canonical_link() $this->assertStringContainsString('', $head->renderHead()->toHtml()); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_is_macroable() { SEO::macro('openGraphLocale', function (string $value) { diff --git a/app/tests/Unit/SerializesNewModelsTest.php b/app/tests/Unit/SerializesNewModelsTest.php index 440b6dd1..a15a2033 100644 --- a/app/tests/Unit/SerializesNewModelsTest.php +++ b/app/tests/Unit/SerializesNewModelsTest.php @@ -26,7 +26,7 @@ protected function setUp(): void $this->serializer = invade($this->serializer); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_serializes_and_restores_existing_models() { $model = User::firstOrFail(); @@ -40,7 +40,7 @@ public function it_serializes_and_restores_existing_models() $this->assertTrue($model->is($restored)); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_serializes_and_restores_new_models() { $model = new User(['name' => 'John Doe']); @@ -56,7 +56,7 @@ public function it_serializes_and_restores_new_models() $this->assertEquals('John Doe', $restored->name); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_serializes_and_restores_a_collection_of_existing_models() { $models = User::limit(2)->get(); @@ -77,7 +77,7 @@ public function it_serializes_and_restores_a_collection_of_existing_models() $this->assertCount(2, $restored); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_serializes_and_restores_a_collection_of_new_models() { $models = new Collection([ @@ -103,7 +103,7 @@ public function it_serializes_and_restores_a_collection_of_new_models() $this->assertEquals('Jane Doe', $restored->last()->name); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_serializes_and_restores_a_collection_of_mixed_models() { $models = new Collection([ diff --git a/app/tests/Unit/SpladeCoreTest.php b/app/tests/Unit/SpladeCoreTest.php index 3fd76119..b2854317 100644 --- a/app/tests/Unit/SpladeCoreTest.php +++ b/app/tests/Unit/SpladeCoreTest.php @@ -15,7 +15,7 @@ class SpladeCoreTest extends TestCase { - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_generates_a_regular_redirect_on_non_splade_requests() { $redirect = Splade::redirectAway('https://splade.dev'); @@ -24,7 +24,7 @@ public function it_generates_a_regular_redirect_on_non_splade_requests() $this->assertEquals('https://splade.dev', $redirect->getTargetUrl()); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_generate_a_409_response_with_a_target_url() { request()->headers->set(SpladeCore::HEADER_SPLADE, true); @@ -36,7 +36,7 @@ public function it_can_generate_a_409_response_with_a_target_url() $this->assertEquals('https://splade.dev', $redirect->headers->get(SpladeCore::HEADER_REDIRECT_AWAY)); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_use_a_custom_exception_hanlder() { $exceptionHandler = Mockery::mock(Handler::class); diff --git a/app/tests/Unit/SpladeMiddlewareTest.php b/app/tests/Unit/SpladeMiddlewareTest.php index c1f469a2..5a77c19b 100644 --- a/app/tests/Unit/SpladeMiddlewareTest.php +++ b/app/tests/Unit/SpladeMiddlewareTest.php @@ -7,7 +7,7 @@ class SpladeMiddlewareTest extends TestCase { - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_format_a_url_into_a_host_and_port_with_defaults() { $this->assertEquals('splade.dev:80', SpladeMiddleware::urlToHostAndPort('http://splade.dev')); diff --git a/app/tests/Unit/SpladeQueryBuilderTest.php b/app/tests/Unit/SpladeQueryBuilderTest.php index b28129c9..2add3e8b 100644 --- a/app/tests/Unit/SpladeQueryBuilderTest.php +++ b/app/tests/Unit/SpladeQueryBuilderTest.php @@ -11,7 +11,7 @@ class SpladeQueryBuilderTest extends TestCase { - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_parse_terms() { $builder = new SpladeQueryBuilder($this->mock(Builder::class)); @@ -25,7 +25,7 @@ public function it_can_parse_terms() $this->assertEquals(['1'], $builder->parseTermsIntoCollection('1')->all()); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_apply_sorting_with_a_closure() { $table = SpladeTable::for(Address::class) diff --git a/app/tests/Unit/SpladeTableTest.php b/app/tests/Unit/SpladeTableTest.php index aa4c2389..eb5f7a6e 100644 --- a/app/tests/Unit/SpladeTableTest.php +++ b/app/tests/Unit/SpladeTableTest.php @@ -10,7 +10,7 @@ class SpladeTableTest extends TestCase { - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_use_a_default_sort_key() { $table = new SpladeTable([]); @@ -28,7 +28,7 @@ public function it_can_use_a_default_sort_key() $this->assertEquals('-name', $table->defaultSortDesc('-name')->getDefaultSort()); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_prevents_double_pagination() { $table = new class extends AbstractTable diff --git a/app/tests/Unit/TableExporterTest.php b/app/tests/Unit/TableExporterTest.php index 697bc367..533287f4 100644 --- a/app/tests/Unit/TableExporterTest.php +++ b/app/tests/Unit/TableExporterTest.php @@ -35,13 +35,13 @@ private function exporter() ); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_generate_an_array_with_the_headings() { $this->assertEquals(['Id', 'Created At', 'Updated At'], $this->exporter()->headings()); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_generate_an_array_with_the_column_formatting() { $this->assertEquals([ @@ -50,7 +50,7 @@ public function it_can_generate_an_array_with_the_column_formatting() ], $this->exporter()->columnFormats()); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_generate_an_array_with_the_column_styling_or_use_a_callback() { /** @var MockInterface $worksheet */ @@ -66,7 +66,7 @@ public function it_can_generate_an_array_with_the_column_styling_or_use_a_callba $this->assertTrue($style->getFont()->getBold()); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_map_an_item() { Carbon::setTestNow(now()); @@ -84,7 +84,7 @@ public function it_can_map_an_item() $this->assertEquals(now(), $row[2]); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_return_the_event_callbacks() { $events = $this->exporter()->registerEvents(); diff --git a/app/tests/Unit/ToastTest.php b/app/tests/Unit/ToastTest.php index dbe7d811..7b72f581 100644 --- a/app/tests/Unit/ToastTest.php +++ b/app/tests/Unit/ToastTest.php @@ -8,7 +8,7 @@ class ToastTest extends TestCase { - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_set_a_default_toast() { $toastA = Splade::toast('Message A')->toArray(); diff --git a/app/tests/Unit/TransformerTest.php b/app/tests/Unit/TransformerTest.php index 871d5759..7efc20b3 100644 --- a/app/tests/Unit/TransformerTest.php +++ b/app/tests/Unit/TransformerTest.php @@ -12,7 +12,7 @@ class TransformerTest extends TestCase { - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_returns_the_instance_when_no_transformer_has_been_found() { $user = User::firstOrFail(); @@ -22,7 +22,7 @@ public function it_returns_the_instance_when_no_transformer_has_been_found() $this->assertTrue($transformer($user)->is($user)); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_throws_an_exception_when_the_transformer_is_invalid() { $user = User::firstOrFail(); @@ -40,7 +40,7 @@ public function it_throws_an_exception_when_the_transformer_is_invalid() $this->fail('Should have thrown an exception'); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_throws_an_exception_when_a_transformer_is_missing() { $user = User::firstOrFail(); @@ -58,7 +58,7 @@ public function it_throws_an_exception_when_a_transformer_is_missing() $this->fail('Should have thrown an exception'); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_doesnt_throw_an_exception_when_the_transformer_is_missing_when_the_instance_cant_be_transformed() { $user = User::firstOrFail()->toArray(); @@ -72,7 +72,7 @@ public function it_doesnt_throw_an_exception_when_the_transformer_is_missing_whe $this->assertEquals([$user, $user], $transformer(collect([$user, $user]))->all()); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_transform_using_a_closure() { $user = User::firstOrFail(); @@ -92,7 +92,7 @@ public function it_can_transform_using_a_closure() ], $transformer($user)); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_transform_a_collection_using_a_closure() { $users = User::take(2)->get(); @@ -120,7 +120,7 @@ public function it_can_transform_a_collection_using_a_closure() ], $transformer($users)); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_transform_using_an_api_resource() { $user = User::firstOrFail(); @@ -135,7 +135,7 @@ public function it_can_transform_using_an_api_resource() ], $transformer($user)); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_transform_a_collection_using_an_api_resource() { $users = User::take(2)->get(); @@ -158,7 +158,7 @@ public function it_can_transform_a_collection_using_an_api_resource() ], $transformer($users)); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_transform_an_array_using_an_api_resource() { $users = User::take(2)->get(); @@ -181,7 +181,7 @@ public function it_can_transform_an_array_using_an_api_resource() ], $transformer($users->all())); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_transform_using_a_fractal_transformer() { $user = User::firstOrFail(); @@ -196,7 +196,7 @@ public function it_can_transform_using_a_fractal_transformer() ], $transformer($user)); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_transform_a_collection_using_a_fractal_transformer() { $users = User::take(2)->get(); @@ -219,7 +219,7 @@ public function it_can_transform_a_collection_using_a_fractal_transformer() ], $transformer($users->all())); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_transform_using_an_instance_that_has_a_transform_method() { $user = User::firstOrFail(); diff --git a/app/tests/Unit/WithVueTest.php b/app/tests/Unit/WithVueTest.php index cbeb7da3..5fcb4531 100644 --- a/app/tests/Unit/WithVueTest.php +++ b/app/tests/Unit/WithVueTest.php @@ -23,7 +23,7 @@ public function handle(Request $request, Closure $next) class WithVueTest extends TestCase { - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_apply_middleware() { $instance = new class @@ -47,7 +47,7 @@ public function it_can_apply_middleware() $this->fail('The middleware did not throw an exception.'); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_return_public_available_methods() { $instance = new class extends Component @@ -64,7 +64,7 @@ private function baz() {} $this->assertEquals(['foo'], $instance->_availableMethods()); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_restore_data_properties_from_an_array() { $instance = new class extends Component @@ -108,7 +108,7 @@ public function __construct( $this->assertEquals('secret', invade($instance)->secret); } - /** @test */ + #[\PHPUnit\Framework\Attributes\Test] public function it_can_serialize_data_properties() { $instance = new class extends Component From 7ab810ed52ed92c6fb7e660c2334cdfd974c178d Mon Sep 17 00:00:00 2001 From: Pascal Baljet Date: Fri, 21 Feb 2025 10:10:56 +0100 Subject: [PATCH 10/10] Update SelectDependentTest.php --- app/tests/Browser/Form/SelectDependentTest.php | 6 ------ 1 file changed, 6 deletions(-) diff --git a/app/tests/Browser/Form/SelectDependentTest.php b/app/tests/Browser/Form/SelectDependentTest.php index 1de639c3..08f9a424 100644 --- a/app/tests/Browser/Form/SelectDependentTest.php +++ b/app/tests/Browser/Form/SelectDependentTest.php @@ -16,7 +16,6 @@ public static function dependentUrls() } #[\PHPUnit\Framework\Attributes\DataProvider('dependentUrls')] - #[\PHPUnit\Framework\Attributes\Test] public function it_restores_the_placeholder_on_regular_selects($url) { @@ -37,7 +36,6 @@ public function it_restores_the_placeholder_on_regular_selects($url) } #[\PHPUnit\Framework\Attributes\DataProvider('dependentUrls')] - #[\PHPUnit\Framework\Attributes\Test] public function it_restores_the_placeholder_on_choices_instances($url) { @@ -60,7 +58,6 @@ public function it_restores_the_placeholder_on_choices_instances($url) } #[\PHPUnit\Framework\Attributes\DataProvider('dependentUrls')] - #[\PHPUnit\Framework\Attributes\Test] public function it_restores_the_placeholder_on_regular_multiple_select($url) { @@ -81,7 +78,6 @@ public function it_restores_the_placeholder_on_regular_multiple_select($url) } #[\PHPUnit\Framework\Attributes\DataProvider('dependentUrls')] - #[\PHPUnit\Framework\Attributes\Test] public function it_restores_the_placeholder_on_choices_multiple_select($url) { @@ -106,7 +102,6 @@ public function it_restores_the_placeholder_on_choices_multiple_select($url) } #[\PHPUnit\Framework\Attributes\DataProvider('dependentUrls')] - #[\PHPUnit\Framework\Attributes\Test] public function it_can_select_the_first_remote_option($url) { @@ -126,7 +121,6 @@ public function it_can_select_the_first_remote_option($url) } #[\PHPUnit\Framework\Attributes\DataProvider('dependentUrls')] - #[\PHPUnit\Framework\Attributes\Test] public function it_can_reset_the_select_option_on_a_remote_url_change($url) {