If run PHPUnit test using run-tests.sh then the info is not correctly retrieved from the class... for example:

$ php ./core/scripts/run-tests.sh --class "Drupal\breakpoint\Tests\BreakpointMediaQueryTest"
Drupal test run
---------------

Tests to be run:
-  (Drupal\breakpoint\Tests\BreakpointMediaQueryTest)

Test run started:
Thursday, May 9, 2013 - 16:31

Test summary
------------

Breakpoint media query tests 2 passes, 0 fails, and 0 exceptions

Test run duration: 0 sec

Files: 
CommentFileSizeAuthor
#1 1991088.simpletest-classloader-phpunit.1.patch783 bytesalexpott
PASSED: [[SimpleTest]]: [MySQL] 55,459 pass(es).
[ View ]

Comments

alexpott’s picture

Status:Active» Needs review
StatusFileSize
new783 bytes
PASSED: [[SimpleTest]]: [MySQL] 55,459 pass(es).
[ View ]

With the attached patch...

php ./core/scripts/run-tests.sh --class "Drupal\breakpoint\Tests\BreakpointMediaQueryTest"

Drupal test run
---------------

Tests to be run:
- Breakpoint media query tests (Drupal\breakpoint\Tests\BreakpointMediaQueryTest)

Test run started:
Thursday, May 9, 2013 - 16:37

Test summary
------------

Breakpoint media query tests 2 passes, 0 fails, and 0 exceptions

Test run duration: 0 sec

Basically this is happening because we haven't called simpletest_classloader_register() before trying to use the getInfo() method form the test class in simpletest_script_reporter_init().

msonnabaum’s picture

Status:Needs review» Reviewed & tested by the community

Nice catch. Looks like a simple enough fix.

catch’s picture

Status:Reviewed & tested by the community» Fixed

Committed/pushed to 8.x, thanks!

Status:Fixed» Closed (fixed)

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