Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
phpunit
Priority:
Major
Category:
Bug report
Assigned:
Reporter:
Created:
9 May 2014 at 04:00 UTC
Updated:
29 Jul 2014 at 23:36 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
xanoComment #3
xanoComment #4
sunI wasn't fully done with the new test discovery yet...
Turns out that there are two more malformed PHPUnit test classes. With attached patch, all of them are fixed now.
Comment #5
xanoComment #7
dries commentedGood catch. How did you guys even find this? :) Either way, committed to 8.x. Thanks!
Comment #9
sunAccounting for new test classes that have been committed since last commit…
Yes. We'll get rid of this issue + the root cause via the parent issue.
Comment #10
ParisLiakos commentedComment #11
webchickCommitted and pushed to 8.x. Thanks!
Comment #14
sunOne more time :-)
The included adjustment to
CacheContextsTestis in preparation for the parent issue. The test class should be defined first in the PHP file of a test.Sorry for the delay... I overhauled the implementation for the parent issue over the past two weeks in order to resolve some major memory/performance issues.
Comment #15
ParisLiakos commentedyeap
Comment #16
jhodgdonIs it even actually OK in PSR-4 (and our coding standards) to have two classes defined in the same file?
See also #2288815: Multiple classes in same file?
Comment #17
sun@jhodgdon: Yes, for PHPUnit test files, that is acceptable. PHPUnit tests are not really loaded via PSR-N in the first place. They may contain helper classes that are local to the test.
Comment #18
webchickCommitted and pushed to 8.x, but... I would really love to stop committing these patches. Is there any way we can add automated tests to check for tests that are not picked up (oh, how meta ;)).
Comment #20
sunYes, the parent issue will prevent this from happening in the future.