AutomatedCronUpdateWithAutomatedCronTest.php 852 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
<?php

/**
 * @file
 * Contains \Drupal\system\Tests\Update\AutomatedCronUpdateWithAutomatedCronTest.
 */

namespace Drupal\system\Tests\Update;

/**
 * Ensures that the automated cron module is installed on update.
 *
 * @group Update
 */
class AutomatedCronUpdateWithAutomatedCronTest extends UpdatePathTestBase {

  /**
   * {@inheritdoc}
   */
  protected function setDatabaseDumpFiles() {
    $this->databaseDumpFiles = [
      __DIR__ . '/../../../tests/fixtures/update/drupal-8.bare.standard.php.gz',
    ];
  }

  /**
   * Ensures that automated cron module isn installed and the config migrated.
   */
  public function testUpdate() {
    $this->runUpdates();

    $module_data = \Drupal::config('core.extension')->get('module');
    $this->assertTrue(isset($module_data['automated_cron']), 'The automated cron module was installed.');
  }

}