From 9203f68824d36e4211c9e47f3886189ed824bf73 Mon Sep 17 00:00:00 2001 From: Moshe Weitzman Date: Thu, 7 Feb 2019 14:58:28 -0500 Subject: [PATCH] Move a few tests to integration from functional. (#3919) * Make testInsecurePackage an integration test. * Add SAConvertTest --- .../{functional => integration}/SecurityUpdatesTest.php | 9 +++------ .../{functional => integration}/SiteAliasConvertTest.php | 4 ++-- 2 files changed, 5 insertions(+), 8 deletions(-) rename tests/{functional => integration}/SecurityUpdatesTest.php (75%) rename tests/{functional => integration}/SiteAliasConvertTest.php (89%) diff --git a/tests/functional/SecurityUpdatesTest.php b/tests/integration/SecurityUpdatesTest.php similarity index 75% rename from tests/functional/SecurityUpdatesTest.php rename to tests/integration/SecurityUpdatesTest.php index 47a26a4b59..f1a4ed0310 100644 --- a/tests/functional/SecurityUpdatesTest.php +++ b/tests/integration/SecurityUpdatesTest.php @@ -2,15 +2,12 @@ namespace Unish; -use Drush\Commands\pm\SecurityUpdateCommands; - /** - * Tests "pm:security" commands for D8+. + * Tests "pm:security" command. * @group commands - * @group slow * @group pm */ -class SecurityUpdatesTest extends CommandUnishTestCase +class SecurityUpdatesTest extends UnishIntegrationTestCase { /** @@ -18,7 +15,7 @@ class SecurityUpdatesTest extends CommandUnishTestCase */ public function testInsecurePackage() { - $this->drush('pm:security', [], ['format' => 'json'], null, null, self::EXIT_ERROR); + $this->drush('pm:security', [], ['format' => 'json'], self::EXIT_ERROR); $this->assertContains('One or more of your dependencies has an outstanding security update.', $this->getErrorOutput()); $this->assertContains('Try running: composer require drupal/alinks --update-with-dependencies', $this->getErrorOutput()); $security_advisories = $this->getOutputFromJSON(); diff --git a/tests/functional/SiteAliasConvertTest.php b/tests/integration/SiteAliasConvertTest.php similarity index 89% rename from tests/functional/SiteAliasConvertTest.php rename to tests/integration/SiteAliasConvertTest.php index 1b925766d0..cc78c1b6f1 100644 --- a/tests/functional/SiteAliasConvertTest.php +++ b/tests/integration/SiteAliasConvertTest.php @@ -8,7 +8,7 @@ /** * @group base */ -class SiteAliasConvertTest extends CommandUnishTestCase +class SiteAliasConvertTest extends UnishIntegrationTestCase { /** @@ -18,7 +18,7 @@ public function testSiteAliasConvert() { // Use a custom destination so we don't have to install a Drupal. $destination = Path::join(self::getSandbox(), 'testSiteAliasConvert'); - $this->drush('site:alias-convert', ['destination' => $destination], ['sources' => Path::join(__DIR__, '/resources/alias-fixtures')]); + $this->drush('site:alias-convert', ['destination' => $destination], ['sources' => Path::join(dirname(__DIR__), 'functional/resources/alias-fixtures')]); // Write config alias-path that specifies our destination. $config['drush']['paths']['alias-path'][] = $destination;