public function UpdatePathTestBaseTest::testUpdateHookN in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/system/src/Tests/Update/UpdatePathTestBaseTest.php \Drupal\system\Tests\Update\UpdatePathTestBaseTest::testUpdateHookN()
Test that updates are properly run.
File
- core/
modules/ system/ src/ Tests/ Update/ UpdatePathTestBaseTest.php, line 81 - Contains \Drupal\system\Tests\Update\UpdatePathTestBaseTest.php.
Class
- UpdatePathTestBaseTest
- Tests the update path base class.
Namespace
Drupal\system\Tests\UpdateCode
public function testUpdateHookN() {
// Increment the schema version.
\Drupal::state()
->set('update_test_schema_version', 8001);
$this
->runUpdates();
// Ensure schema has changed.
$this
->assertEqual(drupal_get_installed_schema_version('update_test_schema', TRUE), 8001);
// Ensure the index was added for column a.
$this
->assertTrue(db_index_exists('update_test_schema_table', 'test'), 'Version 8001 of the update_test_schema module is installed.');
}