function DependencyTest::testCreateFromString
Same name in other branches
- 9 core/tests/Drupal/Tests/Core/Extension/DependencyTest.php \Drupal\Tests\Core\Extension\DependencyTest::testCreateFromString()
- 8.9.x core/tests/Drupal/Tests/Core/Extension/DependencyTest.php \Drupal\Tests\Core\Extension\DependencyTest::testCreateFromString()
- 11.x core/tests/Drupal/Tests/Core/Extension/DependencyTest.php \Drupal\Tests\Core\Extension\DependencyTest::testCreateFromString()
@covers ::createFromString @dataProvider providerCreateFromString
File
-
core/
tests/ Drupal/ Tests/ Core/ Extension/ DependencyTest.php, line 21
Class
- DependencyTest
- @coversDefaultClass \Drupal\Core\Extension\Dependency @group Extension
Namespace
Drupal\Tests\Core\ExtensionCode
public function testCreateFromString($string, $expected_name, $expected_project, $expected_constraint) : void {
$dependency = Dependency::createFromString($string);
$this->assertSame($expected_name, $dependency->getName());
$this->assertSame($expected_project, $dependency->getProject());
$this->assertSame($expected_constraint, $dependency->getConstraintString());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.