You are here

update.php in Lightning Core 8.4

Same filename in this branch
  1. 8.4 tests/update.php
  2. 8.4 src/Annotation/Update.php
Same filename and directory in other branches
  1. 8.3 tests/update.php

Prepares a installed code base to run database updates for testing.

File

tests/update.php
View source
<?php

/**
 * @file
 * Prepares a installed code base to run database updates for testing.
 */
use Drupal\node\Entity\NodeType;

// Forcibly uninstall Lightning Dev.
Drupal::configFactory()
  ->getEditable('core.extension')
  ->clear('module.lightning_dev')
  ->save();
Drupal::keyValue('system.schema')
  ->deleteMultiple([
  'lightning_dev',
]);

// Remove Workflow-related settings from the Page content type.
NodeType::load('page')
  ->unsetThirdPartySetting('lightning_workflow', 'workflow')
  ->save();