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

Test suite failing because of a warning #85

Closed
mfendeksilverstripe opened this issue May 11, 2022 · 3 comments
Closed

Test suite failing because of a warning #85

mfendeksilverstripe opened this issue May 11, 2022 · 3 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@mfendeksilverstripe
Copy link
Collaborator

Test suite failing because of a warning

The test suite is failing because the following warning is issues during the test suite.

No tests found in class "SilverStripe\Dev\SapphireTest"

The test run triggers this warning on Travis but also on local. It doesn't seem to be related to PHPUnit version either.

Travis run

PHPUnit 9.5.20 #StandWithUkraine
1340
1341Warning:       Your XML configuration validates against a deprecated schema.
1342Suggestion:    Migrate your XML configuration using "--migrate-configuration"!
1343
1344.W                                                                  2 / 2 (100%)
1345
1346Time: 00:03.842, Memory: 118.50 MB
1347
1348There was 1 warning:
1349
13501) Warning
1351No tests found in class "SilverStripe\Dev\SapphireTest".
1352
1353phpvfscomposer:///home/travis/build/silverstripe/silverstripe-versioned-snapshot-admin/vendor/phpunit/phpunit/phpunit:97
1354/home/travis/build/silverstripe/silverstripe-versioned-snapshot-admin/vendor/bin/phpunit:115
1355
1356WARNINGS!
1357Tests: 2, Assertions: 1, Warnings: 1.
1358The command "if [[ "$PHPUNIT_TEST" != "" && "$PHPUNIT_SUITE" == "" ]]; then vendor/bin/phpunit --fail-on-warning; fi" exited with 1.

Local run

vagrant@vanilla:/var/www/mysite/www$ php vendor/bin/phpunit vendor/silverstripe/versioned-snapshot-admin/tests/ flush=all
PHPUnit 5.7.27 by Sebastian Bergmann and contributors.

.W                                                                  2 / 2 (100%)

Time: 14.01 seconds, Memory: 148.50MB

There was 1 warning:

1) Warning
No tests found in class "SilverStripe\Dev\SapphireTest".

/var/www/mysite/www/vendor/sminnee/phpunit/phpunit:51
/var/www/mysite/www/vendor/bin/phpunit:102

WARNINGS!
Tests: 2, Assertions: 1, Warnings: 1.

I did some initial investigation but I couldn't really find anything obvious. The PHPUnit configuration is identical to the Versioned snapshots module which runs its test suite just fine.

We can still see that the regular test pass so it's not a blocker for development but we should try to fix this soon.

@mfendeksilverstripe mfendeksilverstripe added bug Something isn't working help wanted Extra attention is needed labels May 11, 2022
@GuySartorelli
Copy link
Member

Doesn't explain why the problem isn't occurring in the other module, but looking at the Upgrading to PHPUnit 9.5 for PHP8 support docs, the <testsuite> tag should be wrapped in <testsuites>

@mfendeksilverstripe
Copy link
Collaborator Author

The local run I posted uses PHP Unit 5 and still has the same problem so it's likely unrelated. I can still try it out though.

@mfendeksilverstripe
Copy link
Collaborator Author

Closing this as this is working in #86

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants