Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.x] chore: remove annotations (2) #284

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,7 @@ jobs:
run: echo '127.0.0.1 mariadb postgres mongodb' | sudo tee -a /etc/hosts

- name: Run tests
# In phpunit.xml.dist, tests annotated with "@group mysql" are excluded, revert this
# Run tests twice to ensure that tests are idempotent even if database caching is enabled
run: |
php ./vendor/bin/phpunit --testdox --exclude-group ""
php ./vendor/bin/phpunit --testdox --exclude-group ""
php ./vendor/bin/phpunit --testdox
php ./vendor/bin/phpunit --testdox
16 changes: 15 additions & 1 deletion doc/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,24 @@ Install the dependencies with composer:
docker-compose exec php-fpm composer install
```

Install the lowest dependencies with composer:

```bash
docker-compose exec php-fpm composer update --prefer-lowest
```

Now you can execute the tests with the following command:

```bash
docker-compose exec php-fpm ./vendor/bin/phpunit --exclude-group ""
docker-compose exec php-fpm ./vendor/bin/phpunit
```

## Delete the cache

If you change the version of PHP or dependencies, the caches may cause issues, they can be deleted:

```bash
docker-compose exec php-fpm bash -c "rm -rf tests/App*/var/cache/*"
```

## Apply changes suggested by PHP-CS-Fixer
Expand Down
4 changes: 1 addition & 3 deletions tests/Test/ConfigMysqlCacheDbTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

use Liip\Acme\Tests\App\Entity\User;
use Liip\Acme\Tests\AppConfigMysqlCacheDb\AppConfigMysqlKernelCacheDb;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\PreserveGlobalState;

/**
Expand All @@ -25,8 +24,7 @@
* they are disabled by default (see phpunit.xml.dist).
*
* In order to run them, you have to set the MySQL connection
* parameters in the Tests/AppConfigMysql/config.yml file and
* add “--exclude-group ""” when running PHPUnit.
* parameters in the Tests/AppConfigMysql/config.yml file.
*
* Use Tests/AppConfigMysql/AppConfigMysqlKernelCacheDb.php instead of
* Tests/App/AppKernel.php.
Expand Down
3 changes: 1 addition & 2 deletions tests/Test/ConfigMysqlKeepDatabaseAndSchemaTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@
* they are disabled by default (see phpunit.xml.dist).
*
* In order to run them, you have to set the MySQL connection
* parameters in the Tests/AppConfigMysql/config.yml file and
* add “--exclude-group ""” when running PHPUnit.
* parameters in the Tests/AppConfigMysql/config.yml file.
*
* Use Tests/AppConfigMysqlKeepDatabaseAndSchema/AppConfigMysqlKernelKeepDatabaseAndSchema.php instead of
* Tests/App/AppKernel.php.
Expand Down
3 changes: 1 addition & 2 deletions tests/Test/ConfigMysqlTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ class_alias('\Doctrine\Persistence\ObjectManager', '\Doctrine\Common\Persistence
* they are disabled by default (see phpunit.xml.dist).
*
* In order to run them, you have to set the MySQL connection
* parameters in the Tests/AppConfigMysql/config.yml file and
* add “--exclude-group ""” when running PHPUnit.
* parameters in the Tests/AppConfigMysql/config.yml file.
*
* Use Tests/AppConfigMysql/AppConfigMysqlKernel.php instead of
* Tests/App/AppKernel.php.
Expand Down
3 changes: 1 addition & 2 deletions tests/Test/ConfigMysqlUrlTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@
* they are disabled by default (see phpunit.xml.dist).
*
* In order to run them, you have to set the MySQL connection
* parameters in the Tests/AppConfigMysql/config.yml file and
* add “--exclude-group ""” when running PHPUnit.
* parameters in the Tests/AppConfigMysql/config.yml file.
*
* Use Tests/AppConfigMysql/AppConfigMysqlUrlKernel.php instead of
* Tests/App/AppKernel.php.
Expand Down
3 changes: 1 addition & 2 deletions tests/Test/ConfigPgsqlTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@
* they are disabled by default (see phpunit.xml.dist).
*
* In order to run them, you have to set the PostgreSQL connection
* parameters in the Tests/AppConfigPgsql/config.yml file and
* add “--exclude-group ""” when running PHPUnit.
* parameters in the Tests/AppConfigPgsql/config.yml file.
*
* Use Tests/AppConfigPgsql/AppConfigPgsqlKernel.php instead of
* Tests/App/AppKernel.php.
Expand Down
Loading