You are here

public function CronUpdaterTest::providerUpdaterCalled in Automatic Updates 8.2

Data provider for ::testUpdaterCalled().

Return value

array[] Sets of arguments to pass to the test method.

File

tests/src/Kernel/CronUpdaterTest.php, line 31

Class

CronUpdaterTest
@covers \Drupal\automatic_updates\CronUpdater @covers \automatic_updates_form_update_settings_alter

Namespace

Drupal\Tests\automatic_updates\Kernel

Code

public function providerUpdaterCalled() : array {
  $fixture_dir = __DIR__ . '/../../fixtures/release-history';
  return [
    'disabled, normal release' => [
      CronUpdater::DISABLED,
      "{$fixture_dir}/drupal.9.8.1.xml",
      FALSE,
    ],
    'disabled, security release' => [
      CronUpdater::DISABLED,
      "{$fixture_dir}/drupal.9.8.1-security.xml",
      FALSE,
    ],
    'security only, security release' => [
      CronUpdater::SECURITY,
      "{$fixture_dir}/drupal.9.8.1-security.xml",
      TRUE,
    ],
    'security only, normal release' => [
      CronUpdater::SECURITY,
      "{$fixture_dir}/drupal.9.8.1.xml",
      FALSE,
    ],
    'enabled, normal release' => [
      CronUpdater::ALL,
      "{$fixture_dir}/drupal.9.8.1.xml",
      TRUE,
    ],
    'enabled, security release' => [
      CronUpdater::ALL,
      "{$fixture_dir}/drupal.9.8.1-security.xml",
      TRUE,
    ],
  ];
}