1
0
mirror of https://github.com/phpmyadmin/phpmyadmin.git synced 2026-10-23 18:29:15 +03:00

Migrate PHPUnit configuration to version 11.5

- Rename phpunit.xml.dist to phpunit.xml
- Rename tests/bootstrap-dist.php to tests/bootstrap.php

Signed-off-by: Maurício Meneghini Fauth <mauricio@mfauth.com.br>
This commit is contained in:
Maurício Meneghini Fauth
2026-07-28 22:35:34 -03:00
parent 28cd3776d2
commit da8fa0cc4e
6 changed files with 12 additions and 16 deletions

2
.gitattributes vendored
View File

@@ -29,6 +29,8 @@ tests/*-local-server export-ignore
tests/*.conf export-ignore
tests/*.ini export-ignore
tests/ci-phplint export-ignore
tests/bootstrap.php export-ignore
phpunit.xml export-ignore
.browserslistrc export-ignore
CODE_OF_CONDUCT.md export-ignore
CONTRIBUTING.md export-ignore

View File

@@ -135,7 +135,7 @@ jobs:
TESTSUITE_DATABASE_PREFIX: "selenium"
TESTSUITE_SELENIUM_HOST: "127.0.0.1"
TESTSUITE_SELENIUM_PORT: "4444"
run: ./vendor/bin/phpunit --testsuite end-to-end --no-logging --no-coverage --stop-on-skipped --testdox tests/end-to-end/${{ matrix.test-name }}Test.php
run: ./vendor/bin/phpunit --testsuite end-to-end --no-logging --no-coverage --display-all-issues --stop-on-skipped --testdox tests/end-to-end/${{ matrix.test-name }}Test.php
- name: Output logs and stop server
env:

View File

@@ -50,7 +50,7 @@ jobs:
composer config version "$(php -r "define('VERSION_SUFFIX', ''); require_once('src/Version.php'); echo \PhpMyAdmin\Version::VERSION;")" && \
composer install && \
./bin/generate-mo && \
php\$V -d memory_limit=512M ./vendor/bin/phpunit --no-logging --no-coverage --testsuite unit %s" \
php\$V -d memory_limit=512M ./vendor/bin/phpunit --no-logging --no-coverage --testsuite unit --display-all-issues %s" \
"${{ matrix.php-version }}" "${{ matrix.exclude-phpunit-groups }}" > ./do-tests.sh
- name: Set up multi arch support
@@ -106,7 +106,7 @@ jobs:
composer-options: ${{ matrix.composer-options }}
- name: Run PHP tests
run: composer run phpunit -- --testsuite unit --display-deprecations --display-notices --display-warnings --display-errors
run: composer run phpunit -- --testsuite unit --display-all-issues
- name: Send coverage
uses: codecov/codecov-action@v3
@@ -165,7 +165,7 @@ jobs:
uses: ramsey/composer-install@v4
- name: Run PHP tests
run: composer run phpunit -- --testsuite unit
run: composer run phpunit -- --testsuite unit --display-all-issues
- name: Send coverage
uses: codecov/codecov-action@v3
@@ -225,7 +225,6 @@ jobs:
composer config --unset platform --no-interaction --ansi
composer remove --dev vimeo/psalm psalm/plugin-phpunit --no-update --no-interaction --ansi
composer require --dev phpunit/phpunit:^"$PHPUNIT_VERSION" --no-update --no-interaction --ansi
composer validate --strict
- name: Install Composer dependencies
uses: ramsey/composer-install@v4

3
.gitignore vendored
View File

@@ -61,9 +61,6 @@ phpcs.xml
.phpcs-cache
# PHPUnit
.phpunit.result.cache
phpunit.xml
/tests/bootstrap.php
/tests/gis/*-actual.json
/tests/gis/*-actual.pdf
/tests/gis/*-actual.png

View File

@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.1/phpunit.xsd"
bootstrap="tests/bootstrap-dist.php"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/11.5/phpunit.xsd"
bootstrap="tests/bootstrap.php"
cacheDirectory="build/.phpunit.cache"
executionOrder="random"
defaultTestSuite="unit"
@@ -11,15 +11,13 @@
displayDetailsOnTestsThatTriggerWarnings="true"
displayDetailsOnTestsThatTriggerNotices="true"
displayDetailsOnTestsThatTriggerErrors="true"
displayDetailsOnTestsThatTriggerDeprecations="false"
displayDetailsOnIncompleteTests="true"
requireCoverageMetadata="true"
beStrictAboutOutputDuringTests="true"
colors="true"
>
colors="true">
<source>
<include>
<directory suffix=".php">src</directory>
<directory>src</directory>
</include>
</source>
<coverage>
@@ -33,10 +31,10 @@
</php>
<testsuites>
<testsuite name="unit">
<directory suffix="Test.php">tests/unit</directory>
<directory>tests/unit</directory>
</testsuite>
<testsuite name="end-to-end">
<directory suffix="Test.php">tests/end-to-end</directory>
<directory>tests/end-to-end</directory>
</testsuite>
</testsuites>
<logging>