You are here

public function feedsDrushTest::testDisableFeedsImporter in Feeds 7.2

Tests if an importer can get disabled.

File

tests/drush/feedsDrushTest.php, line 107

Class

feedsDrushTest
Tests Drush integration for Feeds. Based on Drush 8.

Namespace

Unish

Code

public function testDisableFeedsImporter() {

  // First check that the user importer is enabled.
  $eval = "print feeds_importer('user')->disabled;";
  $this
    ->execDrush('php-eval', array(
    $eval,
  ));
  $this
    ->assertEquals('', $this
    ->getOutput());

  // Disable the user importer.
  $this
    ->execDrush('feeds-disable', array(
    'user',
  ));

  // Ensure that the importer is now disabled.
  $this
    ->execDrush('php-eval', array(
    $eval,
  ));
  $this
    ->assertEquals('1', $this
    ->getOutput());
}