-
-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: extract reset:migration tests in another testsuite
- Loading branch information
Showing
14 changed files
with
340 additions
and
132 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
DATABASE_URL="mysql://root:[email protected]:3307/foundry_test?serverVersion=5.7.42" | ||
MONGO_URL="mongodb://127.0.0.1:27018/dbName?compressors=disabled&gssapiServiceName=mongodb" | ||
DATABASE_RESET_MODE="schema" | ||
USE_DAMA_DOCTRINE_TEST_BUNDLE="0" | ||
PHPUNIT_VERSION="9" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,20 +47,15 @@ $ docker compose up --detach | |
# install dependencies | ||
$ composer update | ||
|
||
# run test suite with all available permutations | ||
$ composer test | ||
|
||
# run only one permutation | ||
# run main testsuite (with "schema" reset database strategy) | ||
$ composer test-schema | ||
# or | ||
$ ./phpunit | ||
|
||
# run test suite with dama/doctrine-test-bundle | ||
$ USE_DAMA_DOCTRINE_TEST_BUNDLE=1 vendor/bin/phpunit | ||
|
||
# run test suite with postgreSQL instead of MySQL | ||
$ DATABASE_URL="postgresql://zenstruck:[email protected]:5433/zenstruck_foundry?serverVersion=15" vendor/bin/phpunit | ||
|
||
# run test suite with another PHPUnit version | ||
$ PHPUNIT_VERSION=10 vendor/bin/phpunit | ||
# run "migrate" testsuite (with "migrate" reset database strategy) | ||
$ composer test-migrate | ||
# or | ||
$ ./phpunit --testsuite migrate --bootstrap tests/bootstrap-migrate.php | ||
``` | ||
|
||
### Overriding the default configuration | ||
|
@@ -69,7 +64,12 @@ You can override default environment variables by creating a `.env.local` file, | |
|
||
```bash | ||
# .env.local | ||
DATABASE_URL="postgresql://zenstruck:[email protected]:5433/zenstruck_foundry?serverVersion=15" # enables postgreSQL instead of MySQL | ||
|
||
# change the database to postgreSQL... | ||
DATABASE_URL="postgresql://zenstruck:[email protected]:5433/zenstruck_foundry?serverVersion=15" | ||
# ...or to SQLite | ||
DATABASE_URL="sqlite:///%kernel.project_dir%/var/data.db" | ||
|
||
MONGO_URL="" # disables Mongo | ||
USE_DAMA_DOCTRINE_TEST_BUNDLE="1" # enables dama/doctrine-test-bundle | ||
PHPUNIT_VERSION="11" # possible values: 9, 10, 11, 11.4 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.