function FixtureManipulator::__destruct

Same name and namespace in other branches
  1. 11.x core/modules/package_manager/tests/modules/fixture_manipulator/src/FixtureManipulator.php \Drupal\fixture_manipulator\FixtureManipulator::__destruct()

Ensure that changes were committed before object is destroyed.

1 method overrides FixtureManipulator::__destruct()
StageFixtureManipulator::__destruct in core/modules/package_manager/tests/modules/fixture_manipulator/src/StageFixtureManipulator.php

File

core/modules/package_manager/tests/modules/fixture_manipulator/src/FixtureManipulator.php, line 389

Class

FixtureManipulator
Manipulates a test fixture using Composer commands.

Namespace

Drupal\fixture_manipulator

Code

public function __destruct() {
  if (!$this->committed && !empty($this->manipulatorArguments)) {
    throw new \LogicException('commitChanges() must be called.');
  }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.