RearrangeFilterTest.php

Same filename and directory in other branches
  1. 9 core/modules/views_ui/tests/src/Unit/Form/Ajax/RearrangeFilterTest.php
  2. 10 core/modules/views_ui/tests/src/Unit/Form/Ajax/RearrangeFilterTest.php
  3. 11.x core/modules/views_ui/tests/src/Unit/Form/Ajax/RearrangeFilterTest.php

Namespace

Drupal\Tests\views_ui\Unit\Form\Ajax

File

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

View source
<?php

namespace Drupal\Tests\views_ui\Unit\Form\Ajax;

use Drupal\Tests\UnitTestCase;
use Drupal\views_ui\Form\Ajax\RearrangeFilter;

/**
 * Unit tests for Views UI module functions.
 *
 * @group views_ui
 */
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);
    }

}

Classes

Title Deprecated Summary
RearrangeFilterTest Unit tests for Views UI module functions.

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