You are here

function ContextualUnitTest::testContextualIdToLinks in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/contextual/src/Tests/ContextualUnitTest.php \Drupal\contextual\Tests\ContextualUnitTest::testContextualIdToLinks()

Tests _contextual_id_to_links().

File

core/modules/contextual/src/Tests/ContextualUnitTest.php, line 128
Contains \Drupal\contextual\Tests\ContextualUnitTest.

Class

ContextualUnitTest
Tests all edge cases of converting from #contextual_links to ids and vice versa.

Namespace

Drupal\contextual\Tests

Code

function testContextualIdToLinks() {
  $tests = $this
    ->_contextual_links_id_testcases();
  foreach ($tests as $test) {
    $this
      ->assertIdentical(_contextual_id_to_links($test['id']), $test['links']);
  }
}