Oh my.

The parent issue will end this once for all and prevent it from happening in the future.

Comments

xano’s picture

Status: Needs review » Reviewed & tested by the community

  • Commit 3dd1c5c on 8.x by catch:
    Issue #2262483 by sun: Some PHPUnit tests do not exist.
    
xano’s picture

Status: Reviewed & tested by the community » Fixed
sun’s picture

Status: Fixed » Needs review
StatusFileSize
new1.27 KB

I 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.

xano’s picture

Status: Needs review » Reviewed & tested by the community

  • Commit 63dfd50 on 8.x by Dries:
    Issue #2262483 by sun: Some PHPUnit tests do not exist.
    
dries’s picture

Status: Reviewed & tested by the community » Fixed

Good catch. How did you guys even find this? :) Either way, committed to 8.x. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

sun’s picture

Status: Closed (fixed) » Needs review
StatusFileSize
new4.28 KB

Accounting 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.

ParisLiakos’s picture

Status: Needs review » Reviewed & tested by the community
webchick’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed to 8.x. Thanks!

  • Commit 67c7e45 on 8.x by webchick:
    Issue #2262483 by sun: Fixed Some more PHPUnit tests that do not exist.
    

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

sun’s picture

Status: Closed (fixed) » Needs review
StatusFileSize
new1.99 KB

One more time :-)

The included adjustment to CacheContextsTest is 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.

ParisLiakos’s picture

Status: Needs review » Reviewed & tested by the community

yeap

jhodgdon’s picture

Is 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?

sun’s picture

@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.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Committed 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 ;)).

  • Commit 0657219 on 8.x by webchick:
    Issue #2262483 follow-up by sun: Fixed Some PHPUnit tests do not exist.
    
sun’s picture

Yes, the parent issue will prevent this from happening in the future.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.