diff --git a/TESTING.md b/TESTING.md index 3a2f4e538..92f3184ee 100644 --- a/TESTING.md +++ b/TESTING.md @@ -45,8 +45,21 @@ DB_PASSWORD={} 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: -`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. diff --git a/tests/Unit/LdapTest.php b/tests/Unit/LdapTest.php index bae4f3ff4..c286b3849 100644 --- a/tests/Unit/LdapTest.php +++ b/tests/Unit/LdapTest.php @@ -7,6 +7,9 @@ use Exception; use Tests\Support\InteractsWithSettings; use Tests\TestCase; +/** + * @group ldap + */ class LdapTest extends TestCase { use InteractsWithSettings;