diff --git a/.github/workflows/ci-mssql.yml b/.github/workflows/ci-mssql.yml new file mode 100644 index 00000000..007451fb --- /dev/null +++ b/.github/workflows/ci-mssql.yml @@ -0,0 +1,86 @@ +on: + - pull_request + - push + +name: ci-mssql + +jobs: + tests: + name: PHP ${{ matrix.php }}-mssql-${{ matrix.mssql }} + + env: + key: cache + + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + include: + - php: '7.2' + extensions: pdo, pdo_sqlsrv-5.8.1 + mssql: 'server:2017-latest' + - php: '7.3' + extensions: pdo, pdo_sqlsrv-5.8.1 + mssql: 'server:2017-latest' + - php: '7.4' + extensions: pdo, pdo_sqlsrv + mssql: 'server:2017-latest' + - php: '7.4' + extensions: pdo, pdo_sqlsrv + mssql: 'server:2019-latest' + - php: '8.0' + extensions: pdo, pdo_sqlsrv + mssql: 'server:2017-latest' + - php: '8.0' + extensions: pdo, pdo_sqlsrv + mssql: 'server:2019-latest' + + services: + mssql: + image: mcr.microsoft.com/mssql/${{ matrix.mssql }} + env: + SA_PASSWORD: SSpaSS__1 + ACCEPT_EULA: Y + MSSQL_PID: Developer + ports: + - 11433:1433 + options: --name=mssql --health-cmd="/opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P 'SSpaSS__1' -Q 'SELECT 1'" --health-interval=10s --health-timeout=5s --health-retries=3 + + steps: + - name: Checkout + uses: actions/checkout@v2.3.4 + + - name: Install PHP with extensions + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + extensions: ${{ matrix.extensions }} + ini-values: date.timezone='UTC' + tools: composer:v2, pecl + + - name: Determine composer cache directory on Linux + run: echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV + + - name: Cache dependencies installed with composer + uses: actions/cache@v2 + with: + path: ${{ env.COMPOSER_CACHE_DIR }} + key: php${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }} + restore-keys: | + php${{ matrix.php }}-composer- + + - name: Update composer + run: composer self-update + + - name: Install dependencies with composer + run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi + + - name: Install dependencies with composer php 8.0 + if: matrix.php == '8.0' + run: composer update --ignore-platform-reqs --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi + + - name: Run tests with phpunit without coverage + env: + DB: sqlserver + run: vendor/bin/phpunit --group driver-sqlserver --colors=always diff --git a/.github/workflows/ci-mysql.yml b/.github/workflows/ci-mysql.yml new file mode 100644 index 00000000..afcce5fb --- /dev/null +++ b/.github/workflows/ci-mysql.yml @@ -0,0 +1,87 @@ +on: + - pull_request + - push + +name: ci-mysql + +jobs: + tests: + name: PHP ${{ matrix.php-version }}-mysql-${{ matrix.mysql-version }} + env: + extensions: curl, intl, pdo, pdo_mysql + key: cache-v1 + + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + + php-version: + - "7.4" + - "8.0" + + mysql-version: + - "5.7" + - "8.0" + + services: + mysql: + image: mysql:${{ matrix.mysql-version }} + env: + MYSQL_ROOT_PASSWORD: root + MYSQL_DATABASE: spiral + MYSQL_AUTHENTICATION_PLUGIN: mysql_native_password + ports: + - 13306:3306 + options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Setup cache environment + id: cache-env + uses: shivammathur/cache-extensions@v1 + with: + php-version: ${{ matrix.php-version }} + extensions: ${{ env.extensions }} + key: ${{ env.key }} + + - name: Cache extensions + uses: actions/cache@v1 + with: + path: ${{ steps.cache-env.outputs.dir }} + key: ${{ steps.cache-env.outputs.key }} + restore-keys: ${{ steps.cache-env.outputs.key }} + + - name: Install PHP with extensions + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-version }} + extensions: ${{ env.extensions }} + ini-values: date.timezone='UTC' + coverage: pcov + + - name: Determine composer cache directory + if: matrix.os == 'ubuntu-latest' + run: echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV + + - name: Cache dependencies installed with composer + uses: actions/cache@v1 + with: + path: ${{ env.COMPOSER_CACHE_DIR }} + key: php${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('**/composer.json') }} + restore-keys: | + php${{ matrix.php-version }}-composer-${{ matrix.dependencies }}- + + - name: Install dependencies with composer + run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi + + - name: Run mysql tests with phpunit + env: + DB: mysql + MYSQL: ${{ matrix.mysql-version }} + run: vendor/bin/phpunit --group driver-mysql --colors=always diff --git a/.github/workflows/ci-pgsql.yml b/.github/workflows/ci-pgsql.yml new file mode 100644 index 00000000..4c31a6d2 --- /dev/null +++ b/.github/workflows/ci-pgsql.yml @@ -0,0 +1,90 @@ +on: + - pull_request + - push + +name: ci-pgsql + +jobs: + tests: + name: PHP ${{ matrix.php-version }}-pgsql-${{ matrix.pgsql-version }} + env: + extensions: curl, intl, pdo, pdo_pgsql + key: cache-v1 + + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + php-version: + - "7.2" + - "7.3" + - "7.4" + - "8.0" + + pgsql-version: + - "10" + - "11" + - "12" + - "13" + + services: + postgres: + image: postgres:${{ matrix.pgsql-version }} + env: + POSTGRES_USER: postgres + POSTGRES_PASSWORD: postgres + POSTGRES_DB: spiral + ports: + - 15432:5432 + options: --name=postgres --health-cmd="pg_isready" --health-interval=10s --health-timeout=5s --health-retries=3 + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Setup cache environment + id: cache-env + uses: shivammathur/cache-extensions@v1 + with: + php-version: ${{ matrix.php-version }} + extensions: ${{ env.extensions }} + key: ${{ env.key }} + + - name: Cache extensions + uses: actions/cache@v1 + with: + path: ${{ steps.cache-env.outputs.dir }} + key: ${{ steps.cache-env.outputs.key }} + restore-keys: ${{ steps.cache-env.outputs.key }} + + - name: Install PHP with extensions + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-version }} + extensions: ${{ env.extensions }} + ini-values: date.timezone='UTC' + coverage: pcov + + - name: Determine composer cache directory + if: matrix.os == 'ubuntu-latest' + run: echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV + + - name: Cache dependencies installed with composer + uses: actions/cache@v1 + with: + path: ${{ env.COMPOSER_CACHE_DIR }} + key: php${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('**/composer.json') }} + restore-keys: | + php${{ matrix.php-version }}-composer-${{ matrix.dependencies }}- + + - name: Install dependencies with composer + run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi + + - name: Run pgsql tests with phpunit + env: + DB: postgres + POSTGRES: ${{ matrix.pgsql-version }} + run: vendor/bin/phpunit --group driver-postgres --colors=always diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6e50f804..2896f219 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -24,11 +24,11 @@ jobs: run: vendor/bin/spiral-cs check src tests test: needs: lint - name: Test PHP ${{ matrix.php-versions }} + name: Test PHP ${{ matrix.php-versions }} with Code Coverage runs-on: ubuntu-latest strategy: matrix: - php-versions: ['7.2', '7.3', '7.4'] + php-versions: ['7.2', '7.4', '8.0'] steps: - name: Checkout uses: actions/checkout@v2 @@ -38,18 +38,12 @@ jobs: docker-compose up -d cd .. - name: Setup PHP ${{ matrix.php-versions }} - uses: shivammathur/setup-php@v1 + uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php-versions }} coverage: pcov tools: pecl - extensions: mbstring, pdo, pdo_sqlsrv - - name: Install MS SQL Server deps - run: | - bash ./tests/install-sqlsrv.sh - sudo sed -i.bak '/^extension="pdo_sqlsrv.so"/d' /etc/php/${{ matrix.php-versions }}/cli/php.ini - sudo bash -c 'printf "; priority=30\nextension=pdo_sqlsrv.so\n" > /etc/php/${{ matrix.php-versions }}/mods-available/pdo_sqlsrv.ini' - sudo phpenmod -s cli -v ${{ matrix.php-versions }} pdo_sqlsrv + extensions: mbstring, pdo, pdo_sqlite, pdo_pgsql, pdo_sqlsrv, pdo_mysql - name: Get Composer Cache Directory id: composer-cache run: echo "::set-output name=dir::$(composer config cache-files-dir)" @@ -65,77 +59,29 @@ jobs: run: | vendor/bin/phpunit --coverage-clover=coverage.xml - name: Upload coverage to Codecov + continue-on-error: true # if is fork uses: codecov/codecov-action@v1 with: token: ${{ secrets.CODECOV_TOKEN }} file: ./coverage.xml - test_postgres: + + sqlite: needs: lint - name: Test PostgreSQL ${{ matrix.configs.postgres-version }} + name: SQLite PHP ${{ matrix.php-versions }} runs-on: ubuntu-latest strategy: matrix: - configs: [ - {php-version: 7.2, postgres-version: 9.6}, - {php-version: 7.3, postgres-version: 10}, - {php-version: 7.3, postgres-version: 11} - ] - services: - postgres: - image: postgres:${{ matrix.configs.postgres-version }} - ports: - - 5432:5432 - env: - POSTGRES_USER: postgres - POSTGRES_PASSWORD: postgres - POSTGRES_DB: spiral - options: --health-cmd="pg_isready" --health-interval=10s --health-timeout=5s --health-retries=3 + php-versions: ['7.2', '7.3', '7.4', '8.0'] steps: - name: Checkout uses: actions/checkout@v2 - - name: Setup PHP ${{ matrix.configs.php-version }} - run: sudo update-alternatives --set php /usr/bin/php${{ matrix.configs.php-version }} - - name: Get Composer Cache Directory - id: composer-cache - run: echo "::set-output name=dir::$(composer config cache-files-dir)" - - name: Restore Composer Cache - uses: actions/cache@v1 + - name: Setup PHP ${{ matrix.php-versions }} + uses: shivammathur/setup-php@v1 with: - path: ${{ steps.composer-cache.outputs.dir }} - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} - restore-keys: ${{ runner.os }}-composer- - - name: Install Dependencies - run: composer install --no-interaction --prefer-dist - - name: Execute Tests - env: - DB: postgres - POSTGRES: ${{ matrix.configs.postgres-version }} - run: | - vendor/bin/phpunit tests/Database/Driver/Postgres - test_mariadb: - needs: lint - name: Test MariaDB ${{ matrix.configs.mariadb-version }} - runs-on: ubuntu-latest - strategy: - matrix: - configs: [ -# {php-version: 7.2, mariadb-version: 10.2}, - {php-version: 7.3, mariadb-version: 10.4} - ] - services: - mariadb: - image: mariadb:${{ matrix.configs.mariadb-version }} - ports: - - 23306:3306 - env: - MYSQL_ROOT_PASSWORD: root - MYSQL_DATABASE: spiral - options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Setup PHP ${{ matrix.configs.php-version }} - run: sudo update-alternatives --set php /usr/bin/php${{ matrix.configs.php-version }} + php-version: ${{ matrix.php-versions }} + coverage: pcov + tools: pecl + extensions: mbstring, pdo, pdo_sqlite - name: Get Composer Cache Directory id: composer-cache run: echo "::set-output name=dir::$(composer config cache-files-dir)" @@ -149,7 +95,6 @@ jobs: run: composer install --no-interaction --prefer-dist - name: Execute Tests env: - DB: mariadb - MARIADB: ${{ matrix.configs.mariadb-version }} + DB: sqlite run: | - vendor/bin/phpunit tests/Database/Driver/MySQL + vendor/bin/phpunit --group driver-sqlite --colors=always diff --git a/tests/Database/Driver/MySQL/AlterColumnTest.php b/tests/Database/Driver/MySQL/AlterColumnTest.php index c9b4cf8b..23d954b2 100644 --- a/tests/Database/Driver/MySQL/AlterColumnTest.php +++ b/tests/Database/Driver/MySQL/AlterColumnTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\MySQL; +/** + * @group driver + * @group driver-mysql + */ class AlterColumnTest extends \Spiral\Database\Tests\AlterColumnTest { public const DRIVER = 'mysql'; diff --git a/tests/Database/Driver/MySQL/BuildersAccessTest.php b/tests/Database/Driver/MySQL/BuildersAccessTest.php index 504595be..8d81c40e 100644 --- a/tests/Database/Driver/MySQL/BuildersAccessTest.php +++ b/tests/Database/Driver/MySQL/BuildersAccessTest.php @@ -13,6 +13,10 @@ use Spiral\Database\Driver\MySQL\Schema\MySQLTable; +/** + * @group driver + * @group driver-mysql + */ class BuildersAccessTest extends \Spiral\Database\Tests\BuildersAccessTest { public const DRIVER = 'mysql'; diff --git a/tests/Database/Driver/MySQL/ConsistencyTest.php b/tests/Database/Driver/MySQL/ConsistencyTest.php index 31d6934a..331f5cd5 100644 --- a/tests/Database/Driver/MySQL/ConsistencyTest.php +++ b/tests/Database/Driver/MySQL/ConsistencyTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\MySQL; +/** + * @group driver + * @group driver-mysql + */ class ConsistencyTest extends \Spiral\Database\Tests\ConsistencyTest { public const DRIVER = 'mysql'; diff --git a/tests/Database/Driver/MySQL/CreateTableTest.php b/tests/Database/Driver/MySQL/CreateTableTest.php index 384ba333..40c9e423 100644 --- a/tests/Database/Driver/MySQL/CreateTableTest.php +++ b/tests/Database/Driver/MySQL/CreateTableTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\MySQL; +/** + * @group driver + * @group driver-mysql + */ class CreateTableTest extends \Spiral\Database\Tests\CreateTableTest { public const DRIVER = 'mysql'; diff --git a/tests/Database/Driver/MySQL/DatabaseTest.php b/tests/Database/Driver/MySQL/DatabaseTest.php index 3366b293..f352a25f 100644 --- a/tests/Database/Driver/MySQL/DatabaseTest.php +++ b/tests/Database/Driver/MySQL/DatabaseTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\MySQL; +/** + * @group driver + * @group driver-mysql + */ class DatabaseTest extends \Spiral\Database\Tests\DatabaseTest { public const DRIVER = 'mysql'; diff --git a/tests/Database/Driver/MySQL/DatetimeColumnTest.php b/tests/Database/Driver/MySQL/DatetimeColumnTest.php index 24bb2d0a..1e5088bc 100644 --- a/tests/Database/Driver/MySQL/DatetimeColumnTest.php +++ b/tests/Database/Driver/MySQL/DatetimeColumnTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\MySQL; +/** + * @group driver + * @group driver-mysql + */ class DatetimeColumnTest extends \Spiral\Database\Tests\DatetimeColumnTest { public const DRIVER = 'mysql'; diff --git a/tests/Database/Driver/MySQL/DefaultValueTest.php b/tests/Database/Driver/MySQL/DefaultValueTest.php index 18580810..510b4f1e 100644 --- a/tests/Database/Driver/MySQL/DefaultValueTest.php +++ b/tests/Database/Driver/MySQL/DefaultValueTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\MySQL; +/** + * @group driver + * @group driver-mysql + */ class DefaultValueTest extends \Spiral\Database\Tests\DefaultValueTest { public const DRIVER = 'mysql'; diff --git a/tests/Database/Driver/MySQL/DeleteQueryTest.php b/tests/Database/Driver/MySQL/DeleteQueryTest.php index 0d43ef4a..33480764 100644 --- a/tests/Database/Driver/MySQL/DeleteQueryTest.php +++ b/tests/Database/Driver/MySQL/DeleteQueryTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\MySQL; +/** + * @group driver + * @group driver-mysql + */ class DeleteQueryTest extends \Spiral\Database\Tests\DeleteQueryTest { public const DRIVER = 'mysql'; diff --git a/tests/Database/Driver/MySQL/ExceptionsTest.php b/tests/Database/Driver/MySQL/ExceptionsTest.php index 1fc3697e..071ab3e6 100644 --- a/tests/Database/Driver/MySQL/ExceptionsTest.php +++ b/tests/Database/Driver/MySQL/ExceptionsTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\MySQL; +/** + * @group driver + * @group driver-mysql + */ class ExceptionsTest extends \Spiral\Database\Tests\ExceptionsTest { public const DRIVER = 'mysql'; diff --git a/tests/Database/Driver/MySQL/ForeignKeysTest.php b/tests/Database/Driver/MySQL/ForeignKeysTest.php index 01276e56..d8a81156 100644 --- a/tests/Database/Driver/MySQL/ForeignKeysTest.php +++ b/tests/Database/Driver/MySQL/ForeignKeysTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\MySQL; +/** + * @group driver + * @group driver-mysql + */ class ForeignKeysTest extends \Spiral\Database\Tests\ForeignKeysTest { public const DRIVER = 'mysql'; diff --git a/tests/Database/Driver/MySQL/IndexesTest.php b/tests/Database/Driver/MySQL/IndexesTest.php index c81b11e8..1d6e9fa2 100644 --- a/tests/Database/Driver/MySQL/IndexesTest.php +++ b/tests/Database/Driver/MySQL/IndexesTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\MySQL; +/** + * @group driver + * @group driver-mysql + */ class IndexesTest extends \Spiral\Database\Tests\IndexesTest { public const DRIVER = 'mysql'; diff --git a/tests/Database/Driver/MySQL/InsertQueryTest.php b/tests/Database/Driver/MySQL/InsertQueryTest.php index 469f0ddb..3e8f22e6 100644 --- a/tests/Database/Driver/MySQL/InsertQueryTest.php +++ b/tests/Database/Driver/MySQL/InsertQueryTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\MySQL; +/** + * @group driver + * @group driver-mysql + */ class InsertQueryTest extends \Spiral\Database\Tests\InsertQueryTest { public const DRIVER = 'mysql'; diff --git a/tests/Database/Driver/MySQL/IsolationTest.php b/tests/Database/Driver/MySQL/IsolationTest.php index 9e4e599f..779844f2 100644 --- a/tests/Database/Driver/MySQL/IsolationTest.php +++ b/tests/Database/Driver/MySQL/IsolationTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\MySQL; +/** + * @group driver + * @group driver-mysql + */ class IsolationTest extends \Spiral\Database\Tests\IsolationTest { public const DRIVER = 'mysql'; diff --git a/tests/Database/Driver/MySQL/NestedQueriesTest.php b/tests/Database/Driver/MySQL/NestedQueriesTest.php index 1530d49c..cc77390f 100644 --- a/tests/Database/Driver/MySQL/NestedQueriesTest.php +++ b/tests/Database/Driver/MySQL/NestedQueriesTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\MySQL; +/** + * @group driver + * @group driver-mysql + */ class NestedQueriesTest extends \Spiral\Database\Tests\NestedQueriesTest { public const DRIVER = 'mysql'; diff --git a/tests/Database/Driver/MySQL/ReflectorTest.php b/tests/Database/Driver/MySQL/ReflectorTest.php index f32cbe72..b363228b 100644 --- a/tests/Database/Driver/MySQL/ReflectorTest.php +++ b/tests/Database/Driver/MySQL/ReflectorTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\MySQL; +/** + * @group driver + * @group driver-mysql + */ class ReflectorTest extends \Spiral\Database\Tests\ReflectorTest { public const DRIVER = 'mysql'; diff --git a/tests/Database/Driver/MySQL/SelectQueryTest.php b/tests/Database/Driver/MySQL/SelectQueryTest.php index 44cf1d4d..7313a031 100644 --- a/tests/Database/Driver/MySQL/SelectQueryTest.php +++ b/tests/Database/Driver/MySQL/SelectQueryTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\MySQL; +/** + * @group driver + * @group driver-mysql + */ class SelectQueryTest extends \Spiral\Database\Tests\SelectQueryTest { public const DRIVER = 'mysql'; diff --git a/tests/Database/Driver/MySQL/StatementTest.php b/tests/Database/Driver/MySQL/StatementTest.php index 57021683..5a7b67b5 100644 --- a/tests/Database/Driver/MySQL/StatementTest.php +++ b/tests/Database/Driver/MySQL/StatementTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\MySQL; +/** + * @group driver + * @group driver-mysql + */ class StatementTest extends \Spiral\Database\Tests\StatementTest { public const DRIVER = 'mysql'; diff --git a/tests/Database/Driver/MySQL/TableTest.php b/tests/Database/Driver/MySQL/TableTest.php index 989aac7d..0f283d01 100644 --- a/tests/Database/Driver/MySQL/TableTest.php +++ b/tests/Database/Driver/MySQL/TableTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\MySQL; +/** + * @group driver + * @group driver-mysql + */ class TableTest extends \Spiral\Database\Tests\TableTest { public const DRIVER = 'mysql'; diff --git a/tests/Database/Driver/MySQL/TransactionsTest.php b/tests/Database/Driver/MySQL/TransactionsTest.php index 382b6bda..f3268814 100644 --- a/tests/Database/Driver/MySQL/TransactionsTest.php +++ b/tests/Database/Driver/MySQL/TransactionsTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\MySQL; +/** + * @group driver + * @group driver-mysql + */ class TransactionsTest extends \Spiral\Database\Tests\TransactionsTest { public const DRIVER = 'mysql'; diff --git a/tests/Database/Driver/MySQL/UpdateQueryTest.php b/tests/Database/Driver/MySQL/UpdateQueryTest.php index d18c32b1..e5e916d6 100644 --- a/tests/Database/Driver/MySQL/UpdateQueryTest.php +++ b/tests/Database/Driver/MySQL/UpdateQueryTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\MySQL; +/** + * @group driver + * @group driver-mysql + */ class UpdateQueryTest extends \Spiral\Database\Tests\UpdateQueryTest { public const DRIVER = 'mysql'; diff --git a/tests/Database/Driver/Postgres/AlterColumnTest.php b/tests/Database/Driver/Postgres/AlterColumnTest.php index bbd62bfc..b0fff186 100644 --- a/tests/Database/Driver/Postgres/AlterColumnTest.php +++ b/tests/Database/Driver/Postgres/AlterColumnTest.php @@ -13,6 +13,10 @@ use Spiral\Database\Exception\StatementException; +/** + * @group driver + * @group driver-postgres + */ class AlterColumnTest extends \Spiral\Database\Tests\AlterColumnTest { public const DRIVER = 'postgres'; diff --git a/tests/Database/Driver/Postgres/BuildersAccessTest.php b/tests/Database/Driver/Postgres/BuildersAccessTest.php index b587a4ff..7cdeaa48 100644 --- a/tests/Database/Driver/Postgres/BuildersAccessTest.php +++ b/tests/Database/Driver/Postgres/BuildersAccessTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\Postgres; +/** + * @group driver + * @group driver-postgres + */ class BuildersAccessTest extends \Spiral\Database\Tests\BuildersAccessTest { public const DRIVER = 'postgres'; diff --git a/tests/Database/Driver/Postgres/ConsistencyTest.php b/tests/Database/Driver/Postgres/ConsistencyTest.php index 2b3fb0be..5e148fa6 100644 --- a/tests/Database/Driver/Postgres/ConsistencyTest.php +++ b/tests/Database/Driver/Postgres/ConsistencyTest.php @@ -14,6 +14,10 @@ use Spiral\Database\Driver\Postgres\PostgresDriver; use Spiral\Database\Injection\FragmentInterface; +/** + * @group driver + * @group driver-postgres + */ class ConsistencyTest extends \Spiral\Database\Tests\ConsistencyTest { public const DRIVER = 'postgres'; diff --git a/tests/Database/Driver/Postgres/CreateTableTest.php b/tests/Database/Driver/Postgres/CreateTableTest.php index 1e2bbbfe..13c6d375 100644 --- a/tests/Database/Driver/Postgres/CreateTableTest.php +++ b/tests/Database/Driver/Postgres/CreateTableTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\Postgres; +/** + * @group driver + * @group driver-postgres + */ class CreateTableTest extends \Spiral\Database\Tests\CreateTableTest { public const DRIVER = 'postgres'; diff --git a/tests/Database/Driver/Postgres/DatabaseTest.php b/tests/Database/Driver/Postgres/DatabaseTest.php index d7d7ba21..2b1f6d90 100644 --- a/tests/Database/Driver/Postgres/DatabaseTest.php +++ b/tests/Database/Driver/Postgres/DatabaseTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\Postgres; +/** + * @group driver + * @group driver-postgres + */ class DatabaseTest extends \Spiral\Database\Tests\DatabaseTest { public const DRIVER = 'postgres'; diff --git a/tests/Database/Driver/Postgres/DatetimeColumnTest.php b/tests/Database/Driver/Postgres/DatetimeColumnTest.php index ff9f9cd7..99727405 100644 --- a/tests/Database/Driver/Postgres/DatetimeColumnTest.php +++ b/tests/Database/Driver/Postgres/DatetimeColumnTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\Postgres; +/** + * @group driver + * @group driver-postgres + */ class DatetimeColumnTest extends \Spiral\Database\Tests\DatetimeColumnTest { public const DRIVER = 'postgres'; diff --git a/tests/Database/Driver/Postgres/DefaultValueTest.php b/tests/Database/Driver/Postgres/DefaultValueTest.php index 7df417ae..c181216e 100644 --- a/tests/Database/Driver/Postgres/DefaultValueTest.php +++ b/tests/Database/Driver/Postgres/DefaultValueTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\Postgres; +/** + * @group driver + * @group driver-postgres + */ class DefaultValueTest extends \Spiral\Database\Tests\DefaultValueTest { public const DRIVER = 'postgres'; diff --git a/tests/Database/Driver/Postgres/DeleteQueryTest.php b/tests/Database/Driver/Postgres/DeleteQueryTest.php index deb7e576..88483642 100644 --- a/tests/Database/Driver/Postgres/DeleteQueryTest.php +++ b/tests/Database/Driver/Postgres/DeleteQueryTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\Postgres; +/** + * @group driver + * @group driver-postgres + */ class DeleteQueryTest extends \Spiral\Database\Tests\DeleteQueryTest { public const DRIVER = 'postgres'; diff --git a/tests/Database/Driver/Postgres/ExceptionsTest.php b/tests/Database/Driver/Postgres/ExceptionsTest.php index c6d396ee..46627fcb 100644 --- a/tests/Database/Driver/Postgres/ExceptionsTest.php +++ b/tests/Database/Driver/Postgres/ExceptionsTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\Postgres; +/** + * @group driver + * @group driver-postgres + */ class ExceptionsTest extends \Spiral\Database\Tests\ExceptionsTest { public const DRIVER = 'postgres'; diff --git a/tests/Database/Driver/Postgres/ForeignKeysTest.php b/tests/Database/Driver/Postgres/ForeignKeysTest.php index 41f5914e..e85ace82 100644 --- a/tests/Database/Driver/Postgres/ForeignKeysTest.php +++ b/tests/Database/Driver/Postgres/ForeignKeysTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\Postgres; +/** + * @group driver + * @group driver-postgres + */ class ForeignKeysTest extends \Spiral\Database\Tests\ForeignKeysTest { public const DRIVER = 'postgres'; diff --git a/tests/Database/Driver/Postgres/IndexesTest.php b/tests/Database/Driver/Postgres/IndexesTest.php index 7af116e9..ba8ecf9f 100644 --- a/tests/Database/Driver/Postgres/IndexesTest.php +++ b/tests/Database/Driver/Postgres/IndexesTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\Postgres; +/** + * @group driver + * @group driver-postgres + */ class IndexesTest extends \Spiral\Database\Tests\IndexesTest { public const DRIVER = 'postgres'; diff --git a/tests/Database/Driver/Postgres/InsertQueryTest.php b/tests/Database/Driver/Postgres/InsertQueryTest.php index abe5b32e..430cee3d 100644 --- a/tests/Database/Driver/Postgres/InsertQueryTest.php +++ b/tests/Database/Driver/Postgres/InsertQueryTest.php @@ -13,6 +13,10 @@ use Spiral\Database\Driver\Postgres\Query\PostgresInsertQuery; +/** + * @group driver + * @group driver-postgres + */ class InsertQueryTest extends \Spiral\Database\Tests\InsertQueryTest { public const DRIVER = 'postgres'; diff --git a/tests/Database/Driver/Postgres/IsolationTest.php b/tests/Database/Driver/Postgres/IsolationTest.php index d4e1badd..2271f0ed 100644 --- a/tests/Database/Driver/Postgres/IsolationTest.php +++ b/tests/Database/Driver/Postgres/IsolationTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\Postgres; +/** + * @group driver + * @group driver-postgres + */ class IsolationTest extends \Spiral\Database\Tests\IsolationTest { public const DRIVER = 'postgres'; diff --git a/tests/Database/Driver/Postgres/NestedQueriesTest.php b/tests/Database/Driver/Postgres/NestedQueriesTest.php index c33d060b..25d515c0 100644 --- a/tests/Database/Driver/Postgres/NestedQueriesTest.php +++ b/tests/Database/Driver/Postgres/NestedQueriesTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\Postgres; +/** + * @group driver + * @group driver-postgres + */ class NestedQueriesTest extends \Spiral\Database\Tests\NestedQueriesTest { public const DRIVER = 'postgres'; diff --git a/tests/Database/Driver/Postgres/ReflectorTest.php b/tests/Database/Driver/Postgres/ReflectorTest.php index 626da1cf..fa070b58 100644 --- a/tests/Database/Driver/Postgres/ReflectorTest.php +++ b/tests/Database/Driver/Postgres/ReflectorTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\Postgres; +/** + * @group driver + * @group driver-postgres + */ class ReflectorTest extends \Spiral\Database\Tests\ReflectorTest { public const DRIVER = 'postgres'; diff --git a/tests/Database/Driver/Postgres/SelectQueryTest.php b/tests/Database/Driver/Postgres/SelectQueryTest.php index ba8cbdf8..6e8ec64a 100644 --- a/tests/Database/Driver/Postgres/SelectQueryTest.php +++ b/tests/Database/Driver/Postgres/SelectQueryTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\Postgres; +/** + * @group driver + * @group driver-postgres + */ class SelectQueryTest extends \Spiral\Database\Tests\SelectQueryTest { public const DRIVER = 'postgres'; diff --git a/tests/Database/Driver/Postgres/StatementTest.php b/tests/Database/Driver/Postgres/StatementTest.php index 9c8942ee..32b4ffa3 100644 --- a/tests/Database/Driver/Postgres/StatementTest.php +++ b/tests/Database/Driver/Postgres/StatementTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\Postgres; +/** + * @group driver + * @group driver-postgres + */ class StatementTest extends \Spiral\Database\Tests\StatementTest { public const DRIVER = 'postgres'; diff --git a/tests/Database/Driver/Postgres/TableTest.php b/tests/Database/Driver/Postgres/TableTest.php index 04b425de..07e09bc4 100644 --- a/tests/Database/Driver/Postgres/TableTest.php +++ b/tests/Database/Driver/Postgres/TableTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\Postgres; +/** + * @group driver + * @group driver-postgres + */ class TableTest extends \Spiral\Database\Tests\TableTest { public const DRIVER = 'postgres'; diff --git a/tests/Database/Driver/Postgres/TransactionsTest.php b/tests/Database/Driver/Postgres/TransactionsTest.php index 4030a3fb..62f5feac 100644 --- a/tests/Database/Driver/Postgres/TransactionsTest.php +++ b/tests/Database/Driver/Postgres/TransactionsTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\Postgres; +/** + * @group driver + * @group driver-postgres + */ class TransactionsTest extends \Spiral\Database\Tests\TransactionsTest { public const DRIVER = 'postgres'; diff --git a/tests/Database/Driver/Postgres/UpdateQueryTest.php b/tests/Database/Driver/Postgres/UpdateQueryTest.php index cc0ce6b7..c01f3847 100644 --- a/tests/Database/Driver/Postgres/UpdateQueryTest.php +++ b/tests/Database/Driver/Postgres/UpdateQueryTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\Postgres; +/** + * @group driver + * @group driver-postgres + */ class UpdateQueryTest extends \Spiral\Database\Tests\UpdateQueryTest { public const DRIVER = 'postgres'; diff --git a/tests/Database/Driver/SQLServer/AlterColumnTest.php b/tests/Database/Driver/SQLServer/AlterColumnTest.php index e0f391c3..a71764fe 100644 --- a/tests/Database/Driver/SQLServer/AlterColumnTest.php +++ b/tests/Database/Driver/SQLServer/AlterColumnTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\SQLServer; +/** + * @group driver + * @group driver-sqlserver + */ class AlterColumnTest extends \Spiral\Database\Tests\AlterColumnTest { public const DRIVER = 'sqlserver'; diff --git a/tests/Database/Driver/SQLServer/BuildersAccessTest.php b/tests/Database/Driver/SQLServer/BuildersAccessTest.php index 714edcd1..47220a58 100644 --- a/tests/Database/Driver/SQLServer/BuildersAccessTest.php +++ b/tests/Database/Driver/SQLServer/BuildersAccessTest.php @@ -13,6 +13,10 @@ use Spiral\Database\Driver\SQLServer\Schema\SQLServerTable; +/** + * @group driver + * @group driver-sqlserver + */ class BuildersAccessTest extends \Spiral\Database\Tests\BuildersAccessTest { public const DRIVER = 'sqlserver'; diff --git a/tests/Database/Driver/SQLServer/ConsistencyTest.php b/tests/Database/Driver/SQLServer/ConsistencyTest.php index fdc0267c..557250aa 100644 --- a/tests/Database/Driver/SQLServer/ConsistencyTest.php +++ b/tests/Database/Driver/SQLServer/ConsistencyTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\SQLServer; +/** + * @group driver + * @group driver-sqlserver + */ class ConsistencyTest extends \Spiral\Database\Tests\ConsistencyTest { public const DRIVER = 'sqlserver'; diff --git a/tests/Database/Driver/SQLServer/CreateTableTest.php b/tests/Database/Driver/SQLServer/CreateTableTest.php index 6691b68f..32fc144b 100644 --- a/tests/Database/Driver/SQLServer/CreateTableTest.php +++ b/tests/Database/Driver/SQLServer/CreateTableTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\SQLServer; +/** + * @group driver + * @group driver-sqlserver + */ class CreateTableTest extends \Spiral\Database\Tests\CreateTableTest { public const DRIVER = 'sqlserver'; diff --git a/tests/Database/Driver/SQLServer/DatabaseTest.php b/tests/Database/Driver/SQLServer/DatabaseTest.php index 3d4e43b7..994e0d0b 100644 --- a/tests/Database/Driver/SQLServer/DatabaseTest.php +++ b/tests/Database/Driver/SQLServer/DatabaseTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\SQLServer; +/** + * @group driver + * @group driver-sqlserver + */ class DatabaseTest extends \Spiral\Database\Tests\DatabaseTest { public const DRIVER = 'sqlserver'; diff --git a/tests/Database/Driver/SQLServer/DatetimeColumnTest.php b/tests/Database/Driver/SQLServer/DatetimeColumnTest.php index 189fe0a0..7d447f60 100644 --- a/tests/Database/Driver/SQLServer/DatetimeColumnTest.php +++ b/tests/Database/Driver/SQLServer/DatetimeColumnTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\SQLServer; +/** + * @group driver + * @group driver-sqlserver + */ class DatetimeColumnTest extends \Spiral\Database\Tests\DatetimeColumnTest { public const DRIVER = 'sqlserver'; diff --git a/tests/Database/Driver/SQLServer/DefaultValueTest.php b/tests/Database/Driver/SQLServer/DefaultValueTest.php index 3d459564..21a29570 100644 --- a/tests/Database/Driver/SQLServer/DefaultValueTest.php +++ b/tests/Database/Driver/SQLServer/DefaultValueTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\SQLServer; +/** + * @group driver + * @group driver-sqlserver + */ class DefaultValueTest extends \Spiral\Database\Tests\DefaultValueTest { public const DRIVER = 'sqlserver'; diff --git a/tests/Database/Driver/SQLServer/DeleteQueryTest.php b/tests/Database/Driver/SQLServer/DeleteQueryTest.php index 436c5b8f..71536172 100644 --- a/tests/Database/Driver/SQLServer/DeleteQueryTest.php +++ b/tests/Database/Driver/SQLServer/DeleteQueryTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\SQLServer; +/** + * @group driver + * @group driver-sqlserver + */ class DeleteQueryTest extends \Spiral\Database\Tests\DeleteQueryTest { public const DRIVER = 'sqlserver'; diff --git a/tests/Database/Driver/SQLServer/ExceptionsTest.php b/tests/Database/Driver/SQLServer/ExceptionsTest.php index 38f7d26e..09b7fbeb 100644 --- a/tests/Database/Driver/SQLServer/ExceptionsTest.php +++ b/tests/Database/Driver/SQLServer/ExceptionsTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\SQLServer; +/** + * @group driver + * @group driver-sqlserver + */ class ExceptionsTest extends \Spiral\Database\Tests\ExceptionsTest { public const DRIVER = 'sqlserver'; diff --git a/tests/Database/Driver/SQLServer/ForeignKeysTest.php b/tests/Database/Driver/SQLServer/ForeignKeysTest.php index e06eaca9..59ab31e0 100644 --- a/tests/Database/Driver/SQLServer/ForeignKeysTest.php +++ b/tests/Database/Driver/SQLServer/ForeignKeysTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\SQLServer; +/** + * @group driver + * @group driver-sqlserver + */ class ForeignKeysTest extends \Spiral\Database\Tests\ForeignKeysTest { public const DRIVER = 'sqlserver'; diff --git a/tests/Database/Driver/SQLServer/IndexesTest.php b/tests/Database/Driver/SQLServer/IndexesTest.php index 70f8748f..60ceacfc 100644 --- a/tests/Database/Driver/SQLServer/IndexesTest.php +++ b/tests/Database/Driver/SQLServer/IndexesTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\SQLServer; +/** + * @group driver + * @group driver-sqlserver + */ class IndexesTest extends \Spiral\Database\Tests\IndexesTest { public const DRIVER = 'sqlserver'; diff --git a/tests/Database/Driver/SQLServer/InsertQueryTest.php b/tests/Database/Driver/SQLServer/InsertQueryTest.php index 07bbe058..7ba991f0 100644 --- a/tests/Database/Driver/SQLServer/InsertQueryTest.php +++ b/tests/Database/Driver/SQLServer/InsertQueryTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\SQLServer; +/** + * @group driver + * @group driver-sqlserver + */ class InsertQueryTest extends \Spiral\Database\Tests\InsertQueryTest { public const DRIVER = 'sqlserver'; diff --git a/tests/Database/Driver/SQLServer/IsolationTest.php b/tests/Database/Driver/SQLServer/IsolationTest.php index b9fd4d84..d698afdf 100644 --- a/tests/Database/Driver/SQLServer/IsolationTest.php +++ b/tests/Database/Driver/SQLServer/IsolationTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\SQLServer; +/** + * @group driver + * @group driver-sqlserver + */ class IsolationTest extends \Spiral\Database\Tests\IsolationTest { public const DRIVER = 'sqlserver'; diff --git a/tests/Database/Driver/SQLServer/NestedQueriesTest.php b/tests/Database/Driver/SQLServer/NestedQueriesTest.php index f6acffa2..aacb64a1 100644 --- a/tests/Database/Driver/SQLServer/NestedQueriesTest.php +++ b/tests/Database/Driver/SQLServer/NestedQueriesTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\SQLServer; +/** + * @group driver + * @group driver-sqlserver + */ class NestedQueriesTest extends \Spiral\Database\Tests\NestedQueriesTest { public const DRIVER = 'sqlserver'; diff --git a/tests/Database/Driver/SQLServer/ReflectorTest.php b/tests/Database/Driver/SQLServer/ReflectorTest.php index 16d5fa1d..cf276613 100644 --- a/tests/Database/Driver/SQLServer/ReflectorTest.php +++ b/tests/Database/Driver/SQLServer/ReflectorTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\SQLServer; +/** + * @group driver + * @group driver-sqlserver + */ class ReflectorTest extends \Spiral\Database\Tests\ReflectorTest { public const DRIVER = 'sqlserver'; diff --git a/tests/Database/Driver/SQLServer/SelectQueryTest.php b/tests/Database/Driver/SQLServer/SelectQueryTest.php index 6ca21b15..9ff065b3 100644 --- a/tests/Database/Driver/SQLServer/SelectQueryTest.php +++ b/tests/Database/Driver/SQLServer/SelectQueryTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\SQLServer; +/** + * @group driver + * @group driver-sqlserver + */ class SelectQueryTest extends \Spiral\Database\Tests\SelectQueryTest { public const DRIVER = 'sqlserver'; diff --git a/tests/Database/Driver/SQLServer/StatementTest.php b/tests/Database/Driver/SQLServer/StatementTest.php index 3d7ef45b..460ab2ef 100644 --- a/tests/Database/Driver/SQLServer/StatementTest.php +++ b/tests/Database/Driver/SQLServer/StatementTest.php @@ -13,6 +13,10 @@ use Spiral\Database\Driver\SQLServer\SQLServerCompiler; +/** + * @group driver + * @group driver-sqlserver + */ class StatementTest extends \Spiral\Database\Tests\StatementTest { public const DRIVER = 'sqlserver'; diff --git a/tests/Database/Driver/SQLServer/TableTest.php b/tests/Database/Driver/SQLServer/TableTest.php index 841a1c18..baa8eb43 100644 --- a/tests/Database/Driver/SQLServer/TableTest.php +++ b/tests/Database/Driver/SQLServer/TableTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\SQLServer; +/** + * @group driver + * @group driver-sqlserver + */ class TableTest extends \Spiral\Database\Tests\TableTest { public const DRIVER = 'sqlserver'; diff --git a/tests/Database/Driver/SQLServer/TransactionsTest.php b/tests/Database/Driver/SQLServer/TransactionsTest.php index 94dde817..6932641d 100644 --- a/tests/Database/Driver/SQLServer/TransactionsTest.php +++ b/tests/Database/Driver/SQLServer/TransactionsTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\SQLServer; +/** + * @group driver + * @group driver-sqlserver + */ class TransactionsTest extends \Spiral\Database\Tests\TransactionsTest { public const DRIVER = 'sqlserver'; diff --git a/tests/Database/Driver/SQLServer/UpdateQueryTest.php b/tests/Database/Driver/SQLServer/UpdateQueryTest.php index 6fac17c5..7d5a6f53 100644 --- a/tests/Database/Driver/SQLServer/UpdateQueryTest.php +++ b/tests/Database/Driver/SQLServer/UpdateQueryTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\SQLServer; +/** + * @group driver + * @group driver-sqlserver + */ class UpdateQueryTest extends \Spiral\Database\Tests\UpdateQueryTest { public const DRIVER = 'sqlserver'; diff --git a/tests/Database/Driver/SQLite/AlterColumnTest.php b/tests/Database/Driver/SQLite/AlterColumnTest.php index 74865558..50ac22ff 100644 --- a/tests/Database/Driver/SQLite/AlterColumnTest.php +++ b/tests/Database/Driver/SQLite/AlterColumnTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\SQLite; +/** + * @group driver + * @group driver-sqlite + */ class AlterColumnTest extends \Spiral\Database\Tests\AlterColumnTest { public const DRIVER = 'sqlite'; diff --git a/tests/Database/Driver/SQLite/BuildersAccessTest.php b/tests/Database/Driver/SQLite/BuildersAccessTest.php index 609ca570..46cb8208 100644 --- a/tests/Database/Driver/SQLite/BuildersAccessTest.php +++ b/tests/Database/Driver/SQLite/BuildersAccessTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\SQLite; +/** + * @group driver + * @group driver-sqlite + */ class BuildersAccessTest extends \Spiral\Database\Tests\BuildersAccessTest { public const DRIVER = 'sqlite'; diff --git a/tests/Database/Driver/SQLite/ConsistencyTest.php b/tests/Database/Driver/SQLite/ConsistencyTest.php index 09cb18b7..3e4db08e 100644 --- a/tests/Database/Driver/SQLite/ConsistencyTest.php +++ b/tests/Database/Driver/SQLite/ConsistencyTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\SQLite; +/** + * @group driver + * @group driver-sqlite + */ class ConsistencyTest extends \Spiral\Database\Tests\ConsistencyTest { public const DRIVER = 'sqlite'; diff --git a/tests/Database/Driver/SQLite/CreateTableTest.php b/tests/Database/Driver/SQLite/CreateTableTest.php index 16d7cd8a..dd35fd07 100644 --- a/tests/Database/Driver/SQLite/CreateTableTest.php +++ b/tests/Database/Driver/SQLite/CreateTableTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\SQLite; +/** + * @group driver + * @group driver-sqlite + */ class CreateTableTest extends \Spiral\Database\Tests\CreateTableTest { public const DRIVER = 'sqlite'; diff --git a/tests/Database/Driver/SQLite/DatabaseTest.php b/tests/Database/Driver/SQLite/DatabaseTest.php index f334820d..b21e2d38 100644 --- a/tests/Database/Driver/SQLite/DatabaseTest.php +++ b/tests/Database/Driver/SQLite/DatabaseTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\SQLite; +/** + * @group driver + * @group driver-sqlite + */ class DatabaseTest extends \Spiral\Database\Tests\DatabaseTest { public const DRIVER = 'sqlite'; diff --git a/tests/Database/Driver/SQLite/DatetimeColumnTest.php b/tests/Database/Driver/SQLite/DatetimeColumnTest.php index 5cfd0bde..77943cbf 100644 --- a/tests/Database/Driver/SQLite/DatetimeColumnTest.php +++ b/tests/Database/Driver/SQLite/DatetimeColumnTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\SQLite; +/** + * @group driver + * @group driver-sqlite + */ class DatetimeColumnTest extends \Spiral\Database\Tests\DatetimeColumnTest { public const DRIVER = 'sqlite'; diff --git a/tests/Database/Driver/SQLite/DefaultValueTest.php b/tests/Database/Driver/SQLite/DefaultValueTest.php index 1b948057..817420ab 100644 --- a/tests/Database/Driver/SQLite/DefaultValueTest.php +++ b/tests/Database/Driver/SQLite/DefaultValueTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\SQLite; +/** + * @group driver + * @group driver-sqlite + */ class DefaultValueTest extends \Spiral\Database\Tests\DefaultValueTest { public const DRIVER = 'sqlite'; diff --git a/tests/Database/Driver/SQLite/DeleteQueryTest.php b/tests/Database/Driver/SQLite/DeleteQueryTest.php index 75e458e7..b285dd28 100644 --- a/tests/Database/Driver/SQLite/DeleteQueryTest.php +++ b/tests/Database/Driver/SQLite/DeleteQueryTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\SQLite; +/** + * @group driver + * @group driver-sqlite + */ class DeleteQueryTest extends \Spiral\Database\Tests\DeleteQueryTest { public const DRIVER = 'sqlite'; diff --git a/tests/Database/Driver/SQLite/ExceptionsTest.php b/tests/Database/Driver/SQLite/ExceptionsTest.php index 13d1d5f9..dda07aea 100644 --- a/tests/Database/Driver/SQLite/ExceptionsTest.php +++ b/tests/Database/Driver/SQLite/ExceptionsTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\SQLite; +/** + * @group driver + * @group driver-sqlite + */ class ExceptionsTest extends \Spiral\Database\Tests\ExceptionsTest { public const DRIVER = 'sqlite'; diff --git a/tests/Database/Driver/SQLite/ForeignKeysTest.php b/tests/Database/Driver/SQLite/ForeignKeysTest.php index 2ad9db5b..97c0a423 100644 --- a/tests/Database/Driver/SQLite/ForeignKeysTest.php +++ b/tests/Database/Driver/SQLite/ForeignKeysTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\SQLite; +/** + * @group driver + * @group driver-sqlite + */ class ForeignKeysTest extends \Spiral\Database\Tests\ForeignKeysTest { public const DRIVER = 'sqlite'; diff --git a/tests/Database/Driver/SQLite/IndexesTest.php b/tests/Database/Driver/SQLite/IndexesTest.php index 1cbd324c..68f27024 100644 --- a/tests/Database/Driver/SQLite/IndexesTest.php +++ b/tests/Database/Driver/SQLite/IndexesTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\SQLite; +/** + * @group driver + * @group driver-sqlite + */ class IndexesTest extends \Spiral\Database\Tests\IndexesTest { public const DRIVER = 'sqlite'; diff --git a/tests/Database/Driver/SQLite/InsertQueryTest.php b/tests/Database/Driver/SQLite/InsertQueryTest.php index 885674c2..cfb92007 100644 --- a/tests/Database/Driver/SQLite/InsertQueryTest.php +++ b/tests/Database/Driver/SQLite/InsertQueryTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\SQLite; +/** + * @group driver + * @group driver-sqlite + */ class InsertQueryTest extends \Spiral\Database\Tests\InsertQueryTest { public const DRIVER = 'sqlite'; diff --git a/tests/Database/Driver/SQLite/IsolationTest.php b/tests/Database/Driver/SQLite/IsolationTest.php index abc302cd..704706dd 100644 --- a/tests/Database/Driver/SQLite/IsolationTest.php +++ b/tests/Database/Driver/SQLite/IsolationTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\SQLite; +/** + * @group driver + * @group driver-sqlite + */ class IsolationTest extends \Spiral\Database\Tests\IsolationTest { public const DRIVER = 'sqlite'; diff --git a/tests/Database/Driver/SQLite/NestedQueriesTest.php b/tests/Database/Driver/SQLite/NestedQueriesTest.php index 67713075..9f7ecc18 100644 --- a/tests/Database/Driver/SQLite/NestedQueriesTest.php +++ b/tests/Database/Driver/SQLite/NestedQueriesTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\SQLite; +/** + * @group driver + * @group driver-sqlite + */ class NestedQueriesTest extends \Spiral\Database\Tests\NestedQueriesTest { public const DRIVER = 'sqlite'; diff --git a/tests/Database/Driver/SQLite/ReflectorTest.php b/tests/Database/Driver/SQLite/ReflectorTest.php index 1504c8a7..be9d7ea8 100644 --- a/tests/Database/Driver/SQLite/ReflectorTest.php +++ b/tests/Database/Driver/SQLite/ReflectorTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\SQLite; +/** + * @group driver + * @group driver-sqlite + */ class ReflectorTest extends \Spiral\Database\Tests\ReflectorTest { public const DRIVER = 'sqlite'; diff --git a/tests/Database/Driver/SQLite/SelectQueryTest.php b/tests/Database/Driver/SQLite/SelectQueryTest.php index 3b8c16b4..888bfb34 100644 --- a/tests/Database/Driver/SQLite/SelectQueryTest.php +++ b/tests/Database/Driver/SQLite/SelectQueryTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\SQLite; +/** + * @group driver + * @group driver-sqlite + */ class SelectQueryTest extends \Spiral\Database\Tests\SelectQueryTest { public const DRIVER = 'sqlite'; diff --git a/tests/Database/Driver/SQLite/StatementTest.php b/tests/Database/Driver/SQLite/StatementTest.php index 76f11737..fc527d70 100644 --- a/tests/Database/Driver/SQLite/StatementTest.php +++ b/tests/Database/Driver/SQLite/StatementTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\SQLite; +/** + * @group driver + * @group driver-sqlite + */ class StatementTest extends \Spiral\Database\Tests\StatementTest { public const DRIVER = 'sqlite'; diff --git a/tests/Database/Driver/SQLite/TableTest.php b/tests/Database/Driver/SQLite/TableTest.php index e0ad3ff6..e4a78ccc 100644 --- a/tests/Database/Driver/SQLite/TableTest.php +++ b/tests/Database/Driver/SQLite/TableTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\SQLite; +/** + * @group driver + * @group driver-sqlite + */ class TableTest extends \Spiral\Database\Tests\TableTest { public const DRIVER = 'sqlite'; diff --git a/tests/Database/Driver/SQLite/TransactionsTest.php b/tests/Database/Driver/SQLite/TransactionsTest.php index cfad6478..dfa0e6ee 100644 --- a/tests/Database/Driver/SQLite/TransactionsTest.php +++ b/tests/Database/Driver/SQLite/TransactionsTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\SQLite; +/** + * @group driver + * @group driver-sqlite + */ class TransactionsTest extends \Spiral\Database\Tests\TransactionsTest { public const DRIVER = 'sqlite'; diff --git a/tests/Database/Driver/SQLite/UpdateQueryTest.php b/tests/Database/Driver/SQLite/UpdateQueryTest.php index e35e6b5a..84d32d60 100644 --- a/tests/Database/Driver/SQLite/UpdateQueryTest.php +++ b/tests/Database/Driver/SQLite/UpdateQueryTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\SQLite; +/** + * @group driver + * @group driver-sqlite + */ class UpdateQueryTest extends \Spiral\Database\Tests\UpdateQueryTest { public const DRIVER = 'sqlite'; diff --git a/tests/bootstrap.php b/tests/bootstrap.php index c94b6646..9b928a0f 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -20,13 +20,9 @@ //Composer require dirname(__DIR__) . '/vendor/autoload.php'; -Database\Tests\BaseTest::$config = [ - 'debug' => false, +$drivers = [ 'sqlite' => [ 'driver' => Database\Driver\SQLite\SQLiteDriver::class, - 'check' => static function () { - return !in_array('sqlite', \PDO::getAvailableDrivers(), true); - }, 'conn' => 'sqlite::memory:', 'user' => 'sqlite', 'pass' => '', @@ -34,9 +30,6 @@ ], 'mysql' => [ 'driver' => Database\Driver\MySQL\MySQLDriver::class, - 'check' => static function () { - return !in_array('mysql', \PDO::getAvailableDrivers(), true); - }, 'conn' => 'mysql:host=127.0.0.1:13306;dbname=spiral', 'user' => 'root', 'pass' => 'root', @@ -44,9 +37,6 @@ ], 'postgres' => [ 'driver' => Database\Driver\Postgres\PostgresDriver::class, - 'check' => static function () { - return !in_array('pgsql', \PDO::getAvailableDrivers(), true); - }, 'conn' => 'pgsql:host=127.0.0.1;port=15432;dbname=spiral', 'user' => 'postgres', 'pass' => 'postgres', @@ -54,46 +44,17 @@ ], 'sqlserver' => [ 'driver' => Database\Driver\SQLServer\SQLServerDriver::class, - 'check' => static function () { - return !in_array('sqlsrv', \PDO::getAvailableDrivers(), true); - }, 'conn' => 'sqlsrv:Server=127.0.0.1,11433;Database=tempdb', - 'user' => 'sa', + 'user' => 'SA', 'pass' => 'SSpaSS__1', 'queryCache' => 100 ], ]; -if (!empty(getenv('DB'))) { - switch (getenv('DB')) { - case 'postgres': - Database\Tests\BaseTest::$config = [ - 'debug' => false, - 'postgres' => [ - 'driver' => Database\Driver\Postgres\PostgresDriver::class, - 'check' => static function () { - return true; - }, - 'conn' => 'pgsql:host=127.0.0.1;port=5432;dbname=spiral', - 'user' => 'postgres', - 'pass' => 'postgres' - ], - ]; - break; - - case 'mariadb': - Database\Tests\BaseTest::$config = [ - 'debug' => false, - 'mysql' => [ - 'driver' => Database\Driver\MySQL\MySQLDriver::class, - 'check' => static function () { - return true; - }, - 'conn' => 'mysql:host=127.0.0.1:23306;dbname=spiral', - 'user' => 'root', - 'pass' => 'root' - ], - ]; - break; - } -} +$db = getenv('DB') ?: null; +Database\Tests\BaseTest::$config = [ + 'debug' => false, + ] + ($db === null + ? $drivers + : array_intersect_key($drivers, array_flip((array)$db)) + ); diff --git a/tests/docker-compose.yml b/tests/docker-compose.yml index 7951e779..3ad3609a 100644 --- a/tests/docker-compose.yml +++ b/tests/docker-compose.yml @@ -2,7 +2,7 @@ version: "3" services: sqlserver: - image: microsoft/mssql-server-linux + image: mcr.microsoft.com/mssql/server:2019-latest ports: - "11433:1433" environment: @@ -11,7 +11,7 @@ services: mysql_latest: image: mysql:latest - restart: 'always' + restart: always command: --default-authentication-plugin=mysql_native_password ports: - "13306:3306" @@ -28,4 +28,4 @@ services: environment: POSTGRES_DB: "spiral" POSTGRES_USER: "postgres" - POSTGRES_PASSWORD: "postgres" \ No newline at end of file + POSTGRES_PASSWORD: "postgres" diff --git a/tests/generate.php b/tests/generate.php index ca212cd1..7adb422c 100644 --- a/tests/generate.php +++ b/tests/generate.php @@ -71,11 +71,16 @@ namespace %s; -class %s extends \%s +/** + * @group driver + * @group driver-%s + */ +class %s extends \\%s { const DRIVER = "%s"; }', $details['namespace'], + $driver, $class->getShortName(), $class->getName(), $driver