Skip to content

Commit

Permalink
Move a few tests to integration from functional. (#3919)
Browse files Browse the repository at this point in the history
* Make testInsecurePackage an integration test.

* Add SAConvertTest
  • Loading branch information
weitzman authored Feb 7, 2019
1 parent 519110f commit 9203f68
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,20 @@

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
{

/**
* Test that insecure packages are correctly identified.
*/
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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
/**
* @group base
*/
class SiteAliasConvertTest extends CommandUnishTestCase
class SiteAliasConvertTest extends UnishIntegrationTestCase
{

/**
Expand All @@ -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;
Expand Down

0 comments on commit 9203f68

Please sign in to comment.