diff --git a/core/modules/simpletest/simpletest.module b/core/modules/simpletest/simpletest.module
index 97caa11..17950f0 100644
--- a/core/modules/simpletest/simpletest.module
+++ b/core/modules/simpletest/simpletest.module
@@ -724,6 +724,13 @@ function simpletest_phpunit_get_available_tests() {
   $test_suite = $configuration->getTestSuiteConfiguration(NULL);
   $test_classes = array();
   foreach ($test_suite AS $test) {
+    // PHPUnit returns a warning message if something is wrong with a test,
+    // throw an exception to avoid an error when trying to call getInfo() on
+    // this.
+    if ($test instanceof PHPUnit_Framework_Warning) {
+      throw new RuntimeException($test->getMessage());
+    }
+
     $name = get_class($test);
     if (!array_key_exists($name, $test_classes)) {
       $test_classes[$name] =  $test->getInfo();
@@ -787,6 +794,9 @@ function simpletest_phpunit_find_testcases($suite) {
     }
     elseif (isset($testcase->testcase) && ((int) $testcase->attributes()->tests) > 0) {
       foreach ($testcase->testcase as $childtestcase) {
+        list($class, $method) = explode('::', $testcase->attributes()->name. 2);
+        $childtestcase['class'] = $class;
+        $childtestcase['name'] = $method;
         $testcases[] = $childtestcase;
       }
     }
diff --git a/core/modules/simpletest/tests/Drupal/simpletest/Tests/PhpUnitErrorTest.php b/core/modules/simpletest/tests/Drupal/simpletest/Tests/PhpUnitErrorTest.php
index 49fcb02..04745e7 100644
--- a/core/modules/simpletest/tests/Drupal/simpletest/Tests/PhpUnitErrorTest.php
+++ b/core/modules/simpletest/tests/Drupal/simpletest/Tests/PhpUnitErrorTest.php
@@ -3,12 +3,20 @@
 namespace Drupal\simpletest\Tests;
 
 use Drupal\Tests\UnitTestCase;
+use PHPUnit_Util_Configuration;
 
 /**
  * Test PHPUnit errors are getting converted to Simpletest errors.
  */
 class PhpUnitErrorTest extends UnitTestCase {
 
+  /**
+   * Stores whether there should be an error thrown when build data.
+   *
+   * @var bool
+   */
+  protected static $throwError = FALSE;
+
   public static function getInfo() {
     return array(
       'name' => 'PHPUnit errors',
@@ -19,6 +27,37 @@ public static function getInfo() {
   }
 
   /**
+   * Tests listing of available tests.
+   */
+  public function testPhpUnitAvailableTests() {
+    require_once __DIR__ . '/../../../../simpletest.module';
+//    static::$throwError = TRUE;
+    try {
+      debug(simpletest_phpunit_get_available_tests());
+    }
+    catch (\Exception $e) {
+//      debug($e);
+    }
+    static::$throwError = FALSE;
+  }
+
+  /**
+   * Helper test for testPhpUnitAvailableTests().
+   *
+   * @dataProvider dataTestProvider
+   */
+  public function testDataProvider() {
+    $foo = 123;
+  }
+
+  public function dataTestProvider() {
+    if (static::$throwError) {
+      throw new \Exception('Test ex ception');
+    }
+    return array(array('test'));
+  }
+
+  /**
    * Test errors reported.
    */
   public function testPhpUnitXmlParsing() {
