class RearrangeFilterTest

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

Unit tests for Views UI module functions.

@group views_ui

Hierarchy

Expanded class hierarchy of RearrangeFilterTest

File

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

Namespace

Drupal\Tests\views_ui\Unit\Form\Ajax
View source
class RearrangeFilterTest extends UnitTestCase {
  
  /**
   * Tests static methods.
   */
  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.