function ContextualUnitTest::testContextualLinksToId
Same name in other branches
- 9 core/modules/contextual/tests/src/Kernel/ContextualUnitTest.php \Drupal\Tests\contextual\Kernel\ContextualUnitTest::testContextualLinksToId()
- 8.9.x core/modules/contextual/tests/src/Kernel/ContextualUnitTest.php \Drupal\Tests\contextual\Kernel\ContextualUnitTest::testContextualLinksToId()
- 10 core/modules/contextual/tests/src/Kernel/ContextualUnitTest.php \Drupal\Tests\contextual\Kernel\ContextualUnitTest::testContextualLinksToId()
Tests the conversion from contextual links to IDs.
@covers ::_contextual_links_to_id
@dataProvider contextualLinksDataProvider
Parameters
array $links: The #contextual_links property value array.
string $id: The serialized representation of the passed links.
File
-
core/
modules/ contextual/ tests/ src/ Kernel/ ContextualUnitTest.php, line 111
Class
- ContextualUnitTest
- Tests edge cases for converting between contextual links and IDs.
Namespace
Drupal\Tests\contextual\KernelCode
public function testContextualLinksToId(array $links, string $id) : void {
$this->assertSame($id, _contextual_links_to_id($links));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.