You are here

protected function FeaturesBundleUiTest::removeAssignment in Features 8.3

Same name and namespace in other branches
  1. 8.4 modules/features_ui/tests/src/Functional/FeaturesBundleUiTest.php \Drupal\Tests\features_ui\Functional\FeaturesBundleUiTest::removeAssignment()

Completely remove a features assignment method from the bundle.

Parameters

string $method_id: The assignment method ID.

1 call to FeaturesBundleUiTest::removeAssignment()
FeaturesBundleUiTest::testNewAssignmentConfigure in modules/features_ui/tests/src/Functional/FeaturesBundleUiTest.php
Tests configuring an assignment that didn't exist before.

File

modules/features_ui/tests/src/Functional/FeaturesBundleUiTest.php, line 72

Class

FeaturesBundleUiTest
Tests configuring bundles.

Namespace

Drupal\Tests\features_ui\Functional

Code

protected function removeAssignment($method_id) {
  $bundle = $this
    ->defaultBundle();
  $assignments = $bundle
    ->get('assignments');
  unset($assignments[$method_id]);
  $bundle
    ->set('assignments', $assignments);
  $bundle
    ->save();
}