public function ContextualUnitTest::testContextualLinksToId in Drupal 10
Same name and namespace in other branches
- 8 core/modules/contextual/tests/src/Kernel/ContextualUnitTest.php \Drupal\Tests\contextual\Kernel\ContextualUnitTest::testContextualLinksToId()
- 9 core/modules/contextual/tests/src/Kernel/ContextualUnitTest.php \Drupal\Tests\contextual\Kernel\ContextualUnitTest::testContextualLinksToId()
Tests _contextual_links_to_id().
File
- core/
modules/ contextual/ tests/ src/ Kernel/ ContextualUnitTest.php, line 115
Class
- ContextualUnitTest
- Tests all edge cases of converting from #contextual_links to ids and vice versa.
Namespace
Drupal\Tests\contextual\KernelCode
public function testContextualLinksToId() {
$tests = $this
->_contextual_links_id_testcases();
foreach ($tests as $test) {
$this
->assertSame($test['id'], _contextual_links_to_id($test['links']));
}
}