function DependencyTest::testOffsetUnset

@covers ::offsetUnset @group legacy

File

core/tests/Drupal/Tests/Core/Extension/DependencyTest.php, line 89

Class

DependencyTest
@coversDefaultClass \Drupal\Core\Extension\Dependency @group Extension

Namespace

Drupal\Tests\Core\Extension

Code

public function testOffsetUnset() {
    $dependency = new Dependency('views', 'drupal', '>8.x-1.1');
    $this->expectException(\BadMethodCallException::class);
    $this->expectExceptionMessage('Drupal\\Core\\Extension\\Dependency::offsetUnset() is not supported');
    unset($dependency['name']);
}

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