You are here

public function DependencyTest::testOffsetUnset in Drupal 8

@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']);
}