You are here

public function DependencyTest::testOffsetSet in Drupal 8

@covers ::offsetSet @group legacy

File

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

Class

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

Namespace

Drupal\Tests\Core\Extension

Code

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