You are here

public function ElementTest::testToTail in Lightning Core 8.4

Same name and namespace in other branches
  1. 8.5 tests/src/Unit/ElementTest.php \Drupal\Tests\lightning_core\Unit\ElementTest::testToTail()
  2. 8 tests/src/Unit/ElementTest.php \Drupal\Tests\lightning_core\Unit\ElementTest::testToTail()
  3. 8.2 tests/src/Unit/ElementTest.php \Drupal\Tests\lightning_core\Unit\ElementTest::testToTail()
  4. 8.3 tests/src/Unit/ElementTest.php \Drupal\Tests\lightning_core\Unit\ElementTest::testToTail()

@covers ::toTail

File

tests/src/Unit/ElementTest.php, line 30

Class

ElementTest
@coversDefaultClass \Drupal\lightning_core\Element

Namespace

Drupal\Tests\lightning_core\Unit

Code

public function testToTail() {
  $items = [
    'here',
    'everywhere',
    'there',
  ];
  $items = array_combine($items, $items);
  Element::toTail($items, 'everywhere');
  $this
    ->assertSame([
    'here',
    'there',
    'everywhere',
  ], array_keys($items));
}