function DependencyTest::testOffsetTest

@covers ::offsetExists @group legacy @expectedDeprecation Array access to Drupal\Core\Extension\Dependency properties is deprecated. Use accessor methods instead. See https://www.drupal.org/node/2756875

File

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

Class

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

Namespace

Drupal\Tests\Core\Extension

Code

public function testOffsetTest() {
    $dependency = new Dependency('views', 'drupal', '>8.x-1.1');
    $this->assertTrue(isset($dependency['name']));
    $this->assertFalse(isset($dependency['foo']));
}

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