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

Fix attribute names in phpunit configurations #5382

Closed
vishwarajanand opened this issue Jul 10, 2022 · 0 comments · Fixed by #5383 or #5597
Closed

Fix attribute names in phpunit configurations #5382

vishwarajanand opened this issue Jul 10, 2022 · 0 comments · Fixed by #5383 or #5597
Labels

Comments

@vishwarajanand
Copy link
Contributor

vishwarajanand commented Jul 10, 2022

There are no name defined in PHPunit configuration files which throws unnecessary warnings while working with PHPUnit. This is very confusing and can be removed easily.

Ex:

➜  Firestore git:(feat_fs_bulkwriter1) ✗ XDEBUG_MODE=coverage  vendor/bin/phpunit --verbose -c phpunit.xml.dist tests/Unit/RateLimiterTest.php                                              
PHPUnit 8.5.27 #StandWithUkraine

Runtime:       PHP 8.1.5 with Xdebug 3.1.2
Configuration: /usr/local/google/home/vishwarajanand/github/google-cloud-php/Firestore/phpunit.xml.dist

  Warning - The configuration file did not pass validation!
  The following problems have been detected:

  Line 4:
  - Element 'testsuite': The attribute 'name' is required but missing.

  Test results may not be as expected.


...                                                                 3 / 3 (100%)

Time: 37 ms, Memory: 4.00 MB

OK (3 tests, 33 assertions)
➜  Firestore git:(feat_fs_bulkwriter1) ✗

vs

➜  Firestore git:(feat_fs_bulkwriter1) ✗ XDEBUG_MODE=coverage  vendor/bin/phpunit --verbose -c phpunit.xml.dist tests/Unit/RateLimiterTest.php
PHPUnit 8.5.27 #StandWithUkraine

Runtime:       PHP 8.1.5 with Xdebug 3.1.2
Configuration: /usr/local/google/home/vishwarajanand/github/google-cloud-php/Firestore/phpunit.xml.dist

...                                                                 3 / 3 (100%)

Time: 39 ms, Memory: 4.00 MB

OK (3 tests, 33 assertions)
➜  Firestore git:(feat_fs_bulkwriter1) ✗

All the "unnecessary" warnings are gone once we add name="Unit Tests" in php unit config files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
1 participant