diff --git a/core/tests/Drupal/KernelTests/Setup/Commands/SetupDrupalTestScriptTest.php b/core/tests/Drupal/KernelTests/Setup/Commands/SetupDrupalTestScriptTest.php index 15bc1bb0a2..3dc6500b20 100644 --- a/core/tests/Drupal/KernelTests/Setup/Commands/SetupDrupalTestScriptTest.php +++ b/core/tests/Drupal/KernelTests/Setup/Commands/SetupDrupalTestScriptTest.php @@ -2,7 +2,6 @@ namespace Drupal\KernelTests\Setup\Commands; -use Drupal\Core\Database\Connection; use Drupal\KernelTests\KernelTestBase; use Drupal\Setup\Commands\TestInstallationSetupApplication; use Drupal\Setup\SetupDrupalTestScript; @@ -15,7 +14,6 @@ * * @group Setup * - * @see \Drupal\Setup\TestInstallationSetup * @see \Drupal\Setup\Commands\TestInstallationSetupApplication * @see \Drupal\Setup\Commands\TestInstallationSetupCommand * @see \Drupal\Setup\Commands\TestTeardownCommand @@ -103,7 +101,7 @@ public function testInstallScript() { $this->assertNotEmpty($db_prefix); $this->assertStringStartsWith('simpletest' . $db_prefix . ':', $result['user_agent']); - $this->assertEqual(0, $app_tester->getStatusCode()); + $this->assertEquals(0, $app_tester->getStatusCode()); $http_client = new Client(); $request = (new Request('GET', getenv('SIMPLETEST_BASE_URL') . '/test-page')) @@ -151,7 +149,7 @@ public function testInstallInDifferentLanguage() { $this->assertNotRegExp('/PHPUnit_Framework_Error_Warning/', $app_tester->getDisplay()); $this->assertNotRegExp('/AlreadyInstalledException/', $app_tester->getDisplay()); - $this->assertEqual(0, $app_tester->getStatusCode()); + $this->assertEquals(0, $app_tester->getStatusCode()); $result = json_decode($app_tester->getDisplay(), TRUE); $http_client = new Client(); diff --git a/core/tests/Drupal/Setup/Commands/TestInstallationSetupApplication.php b/core/tests/Drupal/Setup/Commands/TestInstallationSetupApplication.php index f38c714ab1..15a5ab1804 100644 --- a/core/tests/Drupal/Setup/Commands/TestInstallationSetupApplication.php +++ b/core/tests/Drupal/Setup/Commands/TestInstallationSetupApplication.php @@ -3,7 +3,6 @@ namespace Drupal\Setup\Commands; use Symfony\Component\Console\Application; -use Symfony\Component\Console\Input\InputInterface; /** * Application wrapper for TestInstallationSetupCommand. diff --git a/core/tests/Drupal/Setup/Commands/TestInstallationSetupCommand.php b/core/tests/Drupal/Setup/Commands/TestInstallationSetupCommand.php index 787c398f5d..d26024c3c2 100644 --- a/core/tests/Drupal/Setup/Commands/TestInstallationSetupCommand.php +++ b/core/tests/Drupal/Setup/Commands/TestInstallationSetupCommand.php @@ -88,6 +88,7 @@ protected function configure() { ->addOption('setup_class', NULL, InputOption::VALUE_OPTIONAL) ->addOption('db_url', NULL, InputOption::VALUE_OPTIONAL, 'URL for database or SIMPLETEST_DB', getenv('SIMPLETEST_DB')) ->addOption('base_url', NULL, InputOption::VALUE_OPTIONAL, 'Base URL for site under test or SIMPLETEST_BASE_URL', getenv('SIMPLETEST_BASE_URL')) + ->addOption('install_profile', NULL, InputOption::VALUE_OPTIONAL, 'Install profile to install the site in. Defaults to testing', 'testing') ->addOption('langcode', NULL, InputOption::VALUE_OPTIONAL, 'The language to install the site in.') ; } @@ -104,7 +105,7 @@ protected function execute(InputInterface $input, OutputInterface $output) { $this->bootstrapDrupal(); // Manage site fixture. - $this->setup('testing', $input->getOption('setup_class'), $input->getOption('langcode')); + $this->setup($input->getOption('install_profile'), $input->getOption('setup_class'), $input->getOption('langcode')); $output->writeln(json_encode([ 'db_prefix' => $this->databasePrefix, diff --git a/core/tests/Drupal/Setup/Commands/TestTeardownCommand.php b/core/tests/Drupal/Setup/Commands/TestTeardownCommand.php index ef09908ad3..2acd50eb8d 100644 --- a/core/tests/Drupal/Setup/Commands/TestTeardownCommand.php +++ b/core/tests/Drupal/Setup/Commands/TestTeardownCommand.php @@ -89,6 +89,9 @@ public function teardown($db_prefix) { /** * Bootstraps the drupal kernel. + * + * @param string $db_prefix + * The database prefix. */ protected function bootstrapDrupal($db_prefix) { $request = Request::createFromGlobals();