diff --git a/core/modules/simpletest/lib/Drupal/simpletest/TestBase.php b/core/modules/simpletest/lib/Drupal/simpletest/TestBase.php index 067030bc1f0974474a3493787ebe9e6cb8f0f111..6b4113053c7e28d682ed0688c81f322d7c8a71d3 100644 --- a/core/modules/simpletest/lib/Drupal/simpletest/TestBase.php +++ b/core/modules/simpletest/lib/Drupal/simpletest/TestBase.php @@ -806,6 +806,11 @@ public function run(array $methods = array()) { $test_methods = array_filter(get_class_methods($class), function ($method) { return strpos($method, 'test') === 0; }); + if (empty($test_methods)) { + // Call $this->assert() here because we need to pass along custom caller + // information, lest the wrong originating code file/line be identified. + $this->assert(FALSE, 'No test methods found.', 'Requirements', array('function' => __METHOD__ . '()', 'file' => __FILE__, 'line' => __LINE__)); + } if ($methods) { $test_methods = array_intersect($test_methods, $methods); } diff --git a/core/modules/system/lib/Drupal/system/Tests/Installer/InstallerTranslationTest.php b/core/modules/system/lib/Drupal/system/Tests/Installer/InstallerTranslationTest.php index 691d2931ce8ff16bba2724f41cb5feca03ccfc34..269a846226a67c973ef0e017c19983b37ffb4ba5 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Installer/InstallerTranslationTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Installer/InstallerTranslationTest.php @@ -59,4 +59,12 @@ protected function setUpConfirm() { parent::setUpConfirm(); } + /** + * Verifies that installation succeeded. + */ + public function testInstaller() { + $this->assertUrl('user/1'); + $this->assertResponse(200); + } + }