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. 10 core/modules/views_ui/tests/src/Unit/Form/Ajax/RearrangeFilterTest.php \Drupal\Tests\views_ui\Unit\Form\Ajax\RearrangeFilterTest::testStaticMethods()
  3. 11.x 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 18

Class

RearrangeFilterTest
Unit tests for Views UI module functions.

Namespace

Drupal\Tests\views_ui\Unit\Form\Ajax

Code

public function testStaticMethods() {
    // 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.