Merge pull request #14255 from marcusmoore/chore/sc-24805

Added LDAP group tag to LDAP tests
This commit is contained in:
snipe 2024-02-13 13:42:51 +00:00 committed by GitHub
commit 60ba898167
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 18 additions and 2 deletions

View file

@ -45,8 +45,21 @@ DB_PASSWORD={}
Now you are ready to run the entire test suite from your terminal: Now you are ready to run the entire test suite from your terminal:
`php artisan test` ```shell
php artisan test
````
To run individual test files, you can pass the path to the test that you want to run: To run individual test files, you can pass the path to the test that you want to run:
`php artisan test tests/Unit/AccessoryTest.php` ```shell
php artisan test tests/Unit/AccessoryTest.php
```
Some tests, like ones concerning LDAP, are marked with the `@group` annotation. Those groups can be run, or excluded, using the `--group` or `--exclude-group` flags:
```shell
php artisan test --group=ldap
php artisan test --exclude-group=ldap
```
This can be helpful if a set of tests are failing because you don't have an extension, like LDAP, installed.

View file

@ -7,6 +7,9 @@ use Exception;
use Tests\Support\InteractsWithSettings; use Tests\Support\InteractsWithSettings;
use Tests\TestCase; use Tests\TestCase;
/**
* @group ldap
*/
class LdapTest extends TestCase class LdapTest extends TestCase
{ {
use InteractsWithSettings; use InteractsWithSettings;