You are here

function DependencyMissingTest::testMissingUpdate in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/system/src/Tests/Update/DependencyMissingTest.php \Drupal\system\Tests\Update\DependencyMissingTest::testMissingUpdate()

File

core/modules/system/src/Tests/Update/DependencyMissingTest.php, line 33
Contains \Drupal\system\Tests\Update\DependencyMissingTest.

Class

DependencyMissingTest
Tests that missing update dependencies are correctly flagged.

Namespace

Drupal\system\Tests\Update

Code

function testMissingUpdate() {
  $starting_updates = array(
    'update_test_2' => 8001,
  );
  $update_graph = update_resolve_dependencies($starting_updates);
  $this
    ->assertTrue($update_graph['update_test_2_update_8001']['allowed'], "The module's first update function is allowed to run, since it does not have any missing dependencies.");
  $this
    ->assertFalse($update_graph['update_test_2_update_8002']['allowed'], "The module's second update function is not allowed to run, since it has a direct dependency on a missing update.");
  $this
    ->assertFalse($update_graph['update_test_2_update_8003']['allowed'], "The module's third update function is not allowed to run, since it has an indirect dependency on a missing update.");
}