Skip to content

Commit

Permalink
Supports Paratests and Fixes PHPUnit 11 Supports (#179)
Browse files Browse the repository at this point in the history
* Use `InteractsWithTestCase` tests.

Signed-off-by: Mior Muhammad Zaki <[email protected]>

* Apply fixes from StyleCI

* wip

Signed-off-by: Mior Muhammad Zaki <[email protected]>

* wip

Signed-off-by: Mior Muhammad Zaki <[email protected]>

* wip

Signed-off-by: Mior Muhammad Zaki <[email protected]>

* wip

Signed-off-by: Mior Muhammad Zaki <[email protected]>

* wip

Signed-off-by: Mior Muhammad Zaki <[email protected]>

* wip

Signed-off-by: Mior Muhammad Zaki <[email protected]>

* Apply fixes from StyleCI

* wip

Signed-off-by: Mior Muhammad Zaki <[email protected]>

* wip

Signed-off-by: Mior Muhammad Zaki <[email protected]>

* wip

Signed-off-by: Mior Muhammad Zaki <[email protected]>

* wip

Signed-off-by: Mior Muhammad Zaki <[email protected]>

* wip

Signed-off-by: Mior Muhammad Zaki <[email protected]>

* Apply fixes from StyleCI

* wip

Signed-off-by: Mior Muhammad Zaki <[email protected]>

* wip

Signed-off-by: Mior Muhammad Zaki <[email protected]>

* wip

Signed-off-by: Mior Muhammad Zaki <[email protected]>

* wip

Signed-off-by: Mior Muhammad Zaki <[email protected]>

* wip

Signed-off-by: Mior Muhammad Zaki <[email protected]>

* wip

Signed-off-by: Mior Muhammad Zaki <[email protected]>

* wip

Signed-off-by: Mior Muhammad Zaki <[email protected]>

* wip

Signed-off-by: Mior Muhammad Zaki <[email protected]>

* wip

Signed-off-by: Mior Muhammad Zaki <[email protected]>

* wip

Signed-off-by: Mior Muhammad Zaki <[email protected]>

* wip

Signed-off-by: Mior Muhammad Zaki <[email protected]>

* Apply fixes from StyleCI

---------

Signed-off-by: Mior Muhammad Zaki <[email protected]>
Co-authored-by: StyleCI Bot <[email protected]>
  • Loading branch information
crynobone and StyleCIBot authored Feb 9, 2024
1 parent beecb52 commit a1fd806
Show file tree
Hide file tree
Showing 29 changed files with 914 additions and 1,152 deletions.
51 changes: 47 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand All @@ -41,9 +41,52 @@ jobs:

- name: Install dependencies
run: |
composer require phpunit/phpunit:^${{ matrix.phpunit }} --no-update
composer require "laravel/framework=^${{ matrix.laravel }}" --no-update
composer update --prefer-dist --no-interaction --no-progress
composer update --with=laravel/framework=^${{ matrix.laravel }} --with=phpunit/phpunit:^${{ matrix.phpunit }} --prefer-dist --no-interaction --no-progress
- name: Execute tests
run: vendor/bin/phpunit

paratests:
runs-on: ubuntu-22.04

strategy:
fail-fast: true
matrix:
php: [8.2, 8.3]

name: PHP ${{ matrix.php }} Paratest

services:
mysql:
image: mysql:8
env:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
MYSQL_DATABASE: laravel
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip
ini-values: error_reporting=E_ALL
tools: composer:v2
coverage: none

- name: Install dependencies
run: |
composer require "nunomaduro/collision" "brianium/paratest" --no-update
composer update --prefer-dist --no-interaction --no-progress -W
- name: Execute tests
run: php vendor/bin/testbench package:test --parallel
env:
DB_CONNECTION: mysql
DB_USERNAME: root
DB_DATABASE: laravel
10 changes: 3 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,17 @@
"require": {
"php": "^8.2",
"ext-dom": "*",
"illuminate/contracts": "^10.0|^11.0",
"illuminate/database": "^10.0|^11.0",
"illuminate/http": "^10.0|^11.0",
"illuminate/support": "^10.0|^11.0",
"illuminate/testing": "^10.0|^11.0",
"laravel/framework": "^10.44|^11.0",
"mockery/mockery": "^1.0",
"phpunit/phpunit": "^10.4|^11.0",
"phpunit/phpunit": "^10.4|^11.0.1",
"symfony/console": "^6.2|^7.0",
"symfony/css-selector": "^6.2|^7.0",
"symfony/dom-crawler": "^6.2|^7.0",
"symfony/http-foundation": "^6.2|^7.0",
"symfony/http-kernel": "^6.2|^7.0"
},
"require-dev": {
"laravel/framework": "^10.0|^11.0"
"orchestra/testbench-core": "^8.21|^9.0"
},
"autoload": {
"psr-4": {
Expand Down
2 changes: 1 addition & 1 deletion phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
>
<testsuites>
<testsuite name="Unit">
<directory suffix="Test.php">./tests</directory>
<directory suffix="Test.php">./tests</directory>
</testsuite>
</testsuites>
</phpunit>
82 changes: 0 additions & 82 deletions src/Constraints/Concerns/FormFieldConstraint.php

This file was deleted.

99 changes: 0 additions & 99 deletions src/Constraints/Concerns/HasElement.php

This file was deleted.

78 changes: 0 additions & 78 deletions src/Constraints/Concerns/HasInElement.php

This file was deleted.

Loading

0 comments on commit a1fd806

Please sign in to comment.