function DependencyTest::testOffsetSet

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

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