You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a section in ci.yml where any file ending with Test.php in a tests directory is deleted.
Remove vendor unit tests files that were installed because of the use of --prefer-source
Some older silverstripe vendor modules may still have the phpunit5 setUp() signatures without :void which when loaded will throw fatal PHP errors.
We cannot simply get rid of the 'tests' folders because behat requires vendor/silverstripe/[framework|cms]/tests/behat/serve-bootstrap.php
There are some hardcoded exceptions to this, though, like any file named ExtendTest.php because:
Make an exception for 'ExtendTest.php' which is a misnamed TestOnly non-test class
Except there are a lot of other classes in the same directory as ExtendTest.php which are also DataObjects and should be similarly excluded.
What's more, the only reason specific files are being targetted like this is apparently:
We cannot simply get rid of the 'tests' folders because behat requires vendor/silverstripe/[framework|cms]/tests/behat/serve-bootstrap.php
The only reason this wasn't done initially is because there was resistance to touch it at that stage since it it took a long time getting this fragile approach working in the first place.
Proposal
According to the above comment, only two files from tests directories actually need to be kept. So instead of going through and deleting all the files with seemingly arbitrary exceptions, we should just delete all of the tests directories, with exception of those in framework and cms, where we should delete all files inside tests except the two we need to keep.
If the above comment is found to be incorrect, at the very least it should be updated, and we should find a more robust way of setting exceptions since the current way seems to be pretty inconsistent with what is or isn't excluded.
The text was updated successfully, but these errors were encountered:
There is a section in ci.yml where any file ending with
Test.php
in a tests directory is deleted.There are some hardcoded exceptions to this, though, like any file named
ExtendTest.php
because:Except there are a lot of other classes in the same directory as
ExtendTest.php
which are also DataObjects and should be similarly excluded.What's more, the only reason specific files are being targetted like this is apparently:
The only reason this wasn't done initially is because there was resistance to touch it at that stage since it it took a long time getting this fragile approach working in the first place.
Proposal
According to the above comment, only two files from
tests
directories actually need to be kept. So instead of going through and deleting all the files with seemingly arbitrary exceptions, we should just delete all of thetests
directories, with exception of those in framework and cms, where we should delete all files insidetests
except the two we need to keep.If the above comment is found to be incorrect, at the very least it should be updated, and we should find a more robust way of setting exceptions since the current way seems to be pretty inconsistent with what is or isn't excluded.
The text was updated successfully, but these errors were encountered: