function RearrangeFilterTest::testStaticMethods

Same name and namespace in other branches
  1. 9 core/modules/views_ui/tests/src/Unit/Form/Ajax/RearrangeFilterTest.php \Drupal\Tests\views_ui\Unit\Form\Ajax\RearrangeFilterTest::testStaticMethods()
  2. 8.9.x core/modules/views_ui/tests/src/Unit/Form/Ajax/RearrangeFilterTest.php \Drupal\Tests\views_ui\Unit\Form\Ajax\RearrangeFilterTest::testStaticMethods()
  3. 10 core/modules/views_ui/tests/src/Unit/Form/Ajax/RearrangeFilterTest.php \Drupal\Tests\views_ui\Unit\Form\Ajax\RearrangeFilterTest::testStaticMethods()

Tests static methods.

File

core/modules/views_ui/tests/src/Unit/Form/Ajax/RearrangeFilterTest.php, line 20

Class

RearrangeFilterTest
Unit tests for Views UI module functions.

Namespace

Drupal\Tests\views_ui\Unit\Form\Ajax

Code

public function testStaticMethods() : void {
  // Test the RearrangeFilter::arrayKeyPlus method.
  $original = [
    0 => 'one',
    1 => 'two',
    2 => 'three',
  ];
  $expected = [
    1 => 'one',
    2 => 'two',
    3 => 'three',
  ];
  $this->assertSame(RearrangeFilter::arrayKeyPlus($original), $expected);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.