function ContextualUnitTest::testContextualIdToLinks
Same name in other branches
- 8.9.x core/modules/contextual/tests/src/Kernel/ContextualUnitTest.php \Drupal\Tests\contextual\Kernel\ContextualUnitTest::testContextualIdToLinks()
- 10 core/modules/contextual/tests/src/Kernel/ContextualUnitTest.php \Drupal\Tests\contextual\Kernel\ContextualUnitTest::testContextualIdToLinks()
- 11.x core/modules/contextual/tests/src/Kernel/ContextualUnitTest.php \Drupal\Tests\contextual\Kernel\ContextualUnitTest::testContextualIdToLinks()
Tests the conversion from contextual ID to links.
@covers ::_contextual_id_to_links
@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 127
Class
- ContextualUnitTest
- Tests edge cases for converting between contextual links and IDs.
Namespace
Drupal\Tests\contextual\KernelCode
public function testContextualIdToLinks(array $links, string $id) {
$this->assertSame($links, _contextual_id_to_links($id));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.