diff --git a/core/tests/Drupal/Tests/Setup/Commands/SetupDrupalTestScript.php b/core/tests/Drupal/KernelTests/Setup/Commands/SetupDrupalTestScript.php similarity index 84% rename from core/tests/Drupal/Tests/Setup/Commands/SetupDrupalTestScript.php rename to core/tests/Drupal/KernelTests/Setup/Commands/SetupDrupalTestScript.php index 7162e20623..e7b26d784f 100644 --- a/core/tests/Drupal/Tests/Setup/Commands/SetupDrupalTestScript.php +++ b/core/tests/Drupal/KernelTests/Setup/Commands/SetupDrupalTestScript.php @@ -1,6 +1,6 @@ setAutoExit(FALSE); $app_tester = new ApplicationTester($app); - $output = $app_tester->run( + $app_tester->run( ['command' => 'setup-drupal-test'], [ 'interactive' => FALSE, @@ -33,9 +34,10 @@ public function testInstallScript() { ] ); - $this->assertEquals(0, $output); + $this->assertNotRegExp('/PHPUnit_Framework_Error_Warning/', $app_tester->getDisplay()); $this->assertNotRegExp('/AlreadyInstalledException/', $app_tester->getDisplay()); $this->assertRegExp('/simpletest/', $app_tester->getDisplay()); + $this->assertEqual(0, $app_tester->getStatusCode()); } } diff --git a/core/tests/bootstrap.php b/core/tests/bootstrap.php index 77b270fe23..644d6abfb1 100644 --- a/core/tests/bootstrap.php +++ b/core/tests/bootstrap.php @@ -148,7 +148,7 @@ function drupal_phpunit_populate_class_loader() { }; // Do class loader population. -drupal_phpunit_populate_class_loader(); +$this_is_the_drupal_test_bootstrap_autoloader_so_do_not_be_confused = drupal_phpunit_populate_class_loader(); // Set sane locale settings, to ensure consistent string, dates, times and // numbers handling. @@ -167,3 +167,5 @@ function drupal_phpunit_populate_class_loader() { // make PHP 5 and 7 handle assertion failures the same way, but this call does // not turn runtime assertions on if they weren't on already. Handle::register(); + +return $this_is_the_drupal_test_bootstrap_autoloader_so_do_not_be_confused;