diff --git a/.github/workflows/mutation-tests.yml b/.github/workflows/mutation-tests.yml index d356bad2b4..60b3d2c974 100644 --- a/.github/workflows/mutation-tests.yml +++ b/.github/workflows/mutation-tests.yml @@ -64,7 +64,7 @@ jobs: - name: Collect coverage report run: | - composer run phpunit -- --exclude-group selenium --stop-on-failure + composer run phpunit -- --testsuite unit --stop-on-failure - name: Infection if: ${{ github.base_ref != '' }} diff --git a/.github/workflows/test-selenium.yml b/.github/workflows/test-selenium.yml index 2860f46fd0..4dfa8a4342 100644 --- a/.github/workflows/test-selenium.yml +++ b/.github/workflows/test-selenium.yml @@ -120,7 +120,7 @@ jobs: TESTSUITE_DATABASE_PREFIX: "selenium" TESTSUITE_SELENIUM_HOST: "127.0.0.1" TESTSUITE_SELENIUM_PORT: "4444" - run: ./vendor/bin/phpunit --group selenium --verbose --debug --no-coverage --stop-on-skipped + run: ./vendor/bin/phpunit --testsuite selenium --verbose --debug --no-coverage --stop-on-skipped - name: Output logs and stop server env: CI_MODE: selenium diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 65500688c8..41ac245668 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -17,13 +17,13 @@ jobs: fail-fast: false matrix: include: - - { php-version: '7', arch: 'amd64', exclude-phpunit-groups: 'selenium,extension-iconv' } - - { php-version: '7', arch: 'arm64v8', exclude-phpunit-groups: 'selenium,extension-iconv' } - - { php-version: '7', arch: 'arm32v7', exclude-phpunit-groups: 'selenium,extension-iconv,32bit-incompatible' } - - { php-version: '7', arch: 'arm32v6', exclude-phpunit-groups: 'selenium,extension-iconv,32bit-incompatible' } - - { php-version: '7', arch: 'i386', exclude-phpunit-groups: 'selenium,extension-iconv,32bit-incompatible' } - - { php-version: '7', arch: 'ppc64le', exclude-phpunit-groups: 'selenium,extension-iconv' } - - { php-version: '7', arch: 's390x', exclude-phpunit-groups: 'selenium,extension-iconv,32bit-incompatible' } + - { php-version: '7', arch: 'amd64', exclude-phpunit-groups: 'extension-iconv' } + - { php-version: '7', arch: 'arm64v8', exclude-phpunit-groups: 'extension-iconv' } + - { php-version: '7', arch: 'arm32v7', exclude-phpunit-groups: 'extension-iconv,32bit-incompatible' } + - { php-version: '7', arch: 'arm32v6', exclude-phpunit-groups: 'extension-iconv,32bit-incompatible' } + - { php-version: '7', arch: 'i386', exclude-phpunit-groups: 'extension-iconv,32bit-incompatible' } + - { php-version: '7', arch: 'ppc64le', exclude-phpunit-groups: 'extension-iconv' } + - { php-version: '7', arch: 's390x', exclude-phpunit-groups: 'extension-iconv,32bit-incompatible' } steps: - uses: actions/checkout@v2 - name: Write script @@ -44,7 +44,7 @@ jobs: apk add --update --no-cache --repository https://dl-cdn.alpinelinux.org/alpine/edge/testing php\$V-pecl-pcov && \ composer update && \ ./scripts/generate-mo && \ - php -d memory_limit=512M ./vendor/bin/phpunit --exclude-group=%s" \ + php -d memory_limit=512M ./vendor/bin/phpunit --testsuite unit --exclude-group=%s" \ "${{ matrix.php-version }}" "${{ matrix.exclude-phpunit-groups }}" > ./do-tests.sh - name: Setup multi arch support run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes @@ -67,7 +67,7 @@ jobs: php-version: ["7.2", "7.3", "7.4", "8.0"] experimental: [false] os: [ubuntu-latest] - phpunit-options: ['--exclude-group selenium'] + phpunit-options: ['--testsuite unit'] include: - php-version: '8.1' experimental: true @@ -161,7 +161,7 @@ jobs: - name: Install dependencies run: composer install - name: Run php tests - run: composer run phpunit -- --exclude-group selenium + run: composer run phpunit -- --testsuite unit - name: Send coverage uses: codecov/codecov-action@v1 with: diff --git a/build.xml b/build.xml index 9e60f80c11..4e7215e135 100644 --- a/build.xml +++ b/build.xml @@ -5,7 +5,7 @@ - + diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 290e546f78..7ab79d289e 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -15,7 +15,7 @@ - + test/classes diff --git a/scripts/create-release.sh b/scripts/create-release.sh index b935f50314..476d4f4516 100755 --- a/scripts/create-release.sh +++ b/scripts/create-release.sh @@ -453,7 +453,7 @@ if [ $do_test -eq 1 ] ; then backup_vendor_folder # Generate an autoload for test class files (and include dev namespaces) composer dump-autoload --dev || php -r "echo 'Requires: composer >= v2.1.2' . PHP_EOL; exit(1);" - "${TEMP_PHPUNIT_FOLDER}/vendor/bin/phpunit" --no-coverage --exclude-group selenium + "${TEMP_PHPUNIT_FOLDER}/vendor/bin/phpunit" --no-coverage --testsuite unit test_ret=$? if [ $do_ci -eq 1 ] ; then cd ../.. diff --git a/test/selenium/ChangePasswordTest.php b/test/selenium/ChangePasswordTest.php index b68b83dcb3..00df4cbf04 100644 --- a/test/selenium/ChangePasswordTest.php +++ b/test/selenium/ChangePasswordTest.php @@ -10,7 +10,6 @@ use function array_push; use function trim; /** - * @group selenium * @coversNothing */ class ChangePasswordTest extends TestBase diff --git a/test/selenium/CreateDropDatabaseTest.php b/test/selenium/CreateDropDatabaseTest.php index 74e1e06176..13473acd25 100644 --- a/test/selenium/CreateDropDatabaseTest.php +++ b/test/selenium/CreateDropDatabaseTest.php @@ -5,7 +5,6 @@ declare(strict_types=1); namespace PhpMyAdmin\Tests\Selenium; /** - * @group selenium * @coversNothing */ class CreateDropDatabaseTest extends TestBase diff --git a/test/selenium/CreateRemoveUserTest.php b/test/selenium/CreateRemoveUserTest.php index 82c9d6a0d9..8162140386 100644 --- a/test/selenium/CreateRemoveUserTest.php +++ b/test/selenium/CreateRemoveUserTest.php @@ -5,7 +5,6 @@ declare(strict_types=1); namespace PhpMyAdmin\Tests\Selenium; /** - * @group selenium * @coversNothing */ class CreateRemoveUserTest extends TestBase diff --git a/test/selenium/Database/EventsTest.php b/test/selenium/Database/EventsTest.php index b42cc693cd..c047aadba5 100644 --- a/test/selenium/Database/EventsTest.php +++ b/test/selenium/Database/EventsTest.php @@ -11,7 +11,6 @@ use function sleep; use function strtotime; /** - * @group selenium * @coversNothing */ class EventsTest extends TestBase diff --git a/test/selenium/Database/OperationsTest.php b/test/selenium/Database/OperationsTest.php index 117accbed0..1753785c29 100644 --- a/test/selenium/Database/OperationsTest.php +++ b/test/selenium/Database/OperationsTest.php @@ -9,7 +9,6 @@ use PhpMyAdmin\Tests\Selenium\TestBase; use function sleep; /** - * @group selenium * @coversNothing */ class OperationsTest extends TestBase diff --git a/test/selenium/Database/ProceduresTest.php b/test/selenium/Database/ProceduresTest.php index 5671a18787..28aa0fc5ac 100644 --- a/test/selenium/Database/ProceduresTest.php +++ b/test/selenium/Database/ProceduresTest.php @@ -10,7 +10,6 @@ use function sleep; use function str_replace; /** - * @group selenium * @coversNothing */ class ProceduresTest extends TestBase diff --git a/test/selenium/Database/QueryByExampleTest.php b/test/selenium/Database/QueryByExampleTest.php index 2b96ef9f19..1c24cf4e68 100644 --- a/test/selenium/Database/QueryByExampleTest.php +++ b/test/selenium/Database/QueryByExampleTest.php @@ -10,7 +10,6 @@ use function sleep; use function trim; /** - * @group selenium * @coversNothing */ class QueryByExampleTest extends TestBase diff --git a/test/selenium/Database/StructureTest.php b/test/selenium/Database/StructureTest.php index 521440e85d..219c3a925a 100644 --- a/test/selenium/Database/StructureTest.php +++ b/test/selenium/Database/StructureTest.php @@ -7,7 +7,6 @@ namespace PhpMyAdmin\Tests\Selenium\Database; use PhpMyAdmin\Tests\Selenium\TestBase; /** - * @group selenium * @coversNothing */ class StructureTest extends TestBase diff --git a/test/selenium/Database/TriggersTest.php b/test/selenium/Database/TriggersTest.php index 6458daf743..ec85563c99 100644 --- a/test/selenium/Database/TriggersTest.php +++ b/test/selenium/Database/TriggersTest.php @@ -7,7 +7,6 @@ namespace PhpMyAdmin\Tests\Selenium\Database; use PhpMyAdmin\Tests\Selenium\TestBase; /** - * @group selenium * @coversNothing */ class TriggersTest extends TestBase diff --git a/test/selenium/ExportTest.php b/test/selenium/ExportTest.php index bed829c1f3..11ee724118 100644 --- a/test/selenium/ExportTest.php +++ b/test/selenium/ExportTest.php @@ -7,7 +7,6 @@ namespace PhpMyAdmin\Tests\Selenium; use function sleep; /** - * @group selenium * @coversNothing */ class ExportTest extends TestBase diff --git a/test/selenium/ImportTest.php b/test/selenium/ImportTest.php index f196440dc5..f6e1b11b7a 100644 --- a/test/selenium/ImportTest.php +++ b/test/selenium/ImportTest.php @@ -7,7 +7,6 @@ namespace PhpMyAdmin\Tests\Selenium; use function sleep; /** - * @group selenium * @coversNothing */ class ImportTest extends TestBase diff --git a/test/selenium/LoginTest.php b/test/selenium/LoginTest.php index 6cc4ab4862..481442119d 100644 --- a/test/selenium/LoginTest.php +++ b/test/selenium/LoginTest.php @@ -7,7 +7,6 @@ namespace PhpMyAdmin\Tests\Selenium; use function sleep; /** - * @group selenium * @coversNothing */ class LoginTest extends TestBase diff --git a/test/selenium/NormalizationTest.php b/test/selenium/NormalizationTest.php index 4ab2ceacda..863e60dc81 100644 --- a/test/selenium/NormalizationTest.php +++ b/test/selenium/NormalizationTest.php @@ -5,7 +5,6 @@ declare(strict_types=1); namespace PhpMyAdmin\Tests\Selenium; /** - * @group selenium * @coversNothing */ class NormalizationTest extends TestBase diff --git a/test/selenium/ServerSettingsTest.php b/test/selenium/ServerSettingsTest.php index b7af5e7d9a..301bb93a94 100644 --- a/test/selenium/ServerSettingsTest.php +++ b/test/selenium/ServerSettingsTest.php @@ -5,7 +5,6 @@ declare(strict_types=1); namespace PhpMyAdmin\Tests\Selenium; /** - * @group selenium * @coversNothing */ class ServerSettingsTest extends TestBase diff --git a/test/selenium/SqlQueryTest.php b/test/selenium/SqlQueryTest.php index 5fd916c4fc..026db3fcd2 100644 --- a/test/selenium/SqlQueryTest.php +++ b/test/selenium/SqlQueryTest.php @@ -5,7 +5,6 @@ declare(strict_types=1); namespace PhpMyAdmin\Tests\Selenium; /** - * @group selenium * @coversNothing */ class SqlQueryTest extends TestBase diff --git a/test/selenium/Table/BrowseTest.php b/test/selenium/Table/BrowseTest.php index 61420a03ac..0bbc969546 100644 --- a/test/selenium/Table/BrowseTest.php +++ b/test/selenium/Table/BrowseTest.php @@ -8,7 +8,6 @@ use Facebook\WebDriver\WebDriverKeys; use PhpMyAdmin\Tests\Selenium\TestBase; /** - * @group selenium * @coversNothing */ class BrowseTest extends TestBase diff --git a/test/selenium/Table/CreateTest.php b/test/selenium/Table/CreateTest.php index be9ac5c3ec..363bd16625 100644 --- a/test/selenium/Table/CreateTest.php +++ b/test/selenium/Table/CreateTest.php @@ -9,7 +9,6 @@ use PhpMyAdmin\Tests\Selenium\TestBase; use function sleep; /** - * @group selenium * @coversNothing */ class CreateTest extends TestBase diff --git a/test/selenium/Table/InsertTest.php b/test/selenium/Table/InsertTest.php index f8c8ce42ce..0aca36d1ce 100644 --- a/test/selenium/Table/InsertTest.php +++ b/test/selenium/Table/InsertTest.php @@ -7,7 +7,6 @@ namespace PhpMyAdmin\Tests\Selenium\Table; use PhpMyAdmin\Tests\Selenium\TestBase; /** - * @group selenium * @coversNothing */ class InsertTest extends TestBase diff --git a/test/selenium/Table/OperationsTest.php b/test/selenium/Table/OperationsTest.php index 9c46302c9f..1dba4cd1a4 100644 --- a/test/selenium/Table/OperationsTest.php +++ b/test/selenium/Table/OperationsTest.php @@ -9,7 +9,6 @@ use PhpMyAdmin\Tests\Selenium\TestBase; use function sleep; /** - * @group selenium * @coversNothing */ class OperationsTest extends TestBase diff --git a/test/selenium/Table/StructureTest.php b/test/selenium/Table/StructureTest.php index 6af16f8213..9065632e90 100644 --- a/test/selenium/Table/StructureTest.php +++ b/test/selenium/Table/StructureTest.php @@ -7,7 +7,6 @@ namespace PhpMyAdmin\Tests\Selenium\Table; use PhpMyAdmin\Tests\Selenium\TestBase; /** - * @group selenium * @coversNothing */ class StructureTest extends TestBase diff --git a/test/selenium/TestBase.php b/test/selenium/TestBase.php index bd89e82c97..0ac9b475f6 100644 --- a/test/selenium/TestBase.php +++ b/test/selenium/TestBase.php @@ -59,9 +59,6 @@ use const JSON_PRETTY_PRINT; use const JSON_UNESCAPED_SLASHES; use const PHP_EOL; -/** - * @group selenium - */ abstract class TestBase extends TestCase { /** @var RemoteWebDriver */ diff --git a/test/selenium/TrackingTest.php b/test/selenium/TrackingTest.php index 9d34661ce0..2904bd2e2e 100644 --- a/test/selenium/TrackingTest.php +++ b/test/selenium/TrackingTest.php @@ -5,7 +5,6 @@ declare(strict_types=1); namespace PhpMyAdmin\Tests\Selenium; /** - * @group selenium * @coversNothing */ class TrackingTest extends TestBase diff --git a/test/selenium/XssTest.php b/test/selenium/XssTest.php index 09f92c4f12..7d4ea37657 100644 --- a/test/selenium/XssTest.php +++ b/test/selenium/XssTest.php @@ -5,7 +5,6 @@ declare(strict_types=1); namespace PhpMyAdmin\Tests\Selenium; /** - * @group selenium * @coversNothing */ class XssTest extends TestBase