public function ElementTest::testOrder in Lightning Core 8.5
Same name and namespace in other branches
- 8 tests/src/Unit/ElementTest.php \Drupal\Tests\lightning_core\Unit\ElementTest::testOrder()
- 8.2 tests/src/Unit/ElementTest.php \Drupal\Tests\lightning_core\Unit\ElementTest::testOrder()
- 8.3 tests/src/Unit/ElementTest.php \Drupal\Tests\lightning_core\Unit\ElementTest::testOrder()
- 8.4 tests/src/Unit/ElementTest.php \Drupal\Tests\lightning_core\Unit\ElementTest::testOrder()
@covers ::order
File
- tests/
src/ Unit/ ElementTest.php, line 40
Class
- ElementTest
- @coversDefaultClass \Drupal\lightning_core\Element
Namespace
Drupal\Tests\lightning_core\UnitCode
public function testOrder() {
$items = [
'apple' => 1,
'orange' => 2,
'banana' => 3,
];
Element::order($items, [
'banana',
'apple',
'orange',
]);
$this
->assertSame([
'banana',
'apple',
'orange',
], array_keys($items));
}