function MakeUniqueEntityFieldTest::providerTestMakeUniqueEntityField

Same name in other branches
  1. 9 core/modules/migrate/tests/src/Unit/process/MakeUniqueEntityFieldTest.php \Drupal\Tests\migrate\Unit\process\MakeUniqueEntityFieldTest::providerTestMakeUniqueEntityField()
  2. 8.9.x core/modules/migrate/tests/src/Unit/process/MakeUniqueEntityFieldTest.php \Drupal\Tests\migrate\Unit\process\MakeUniqueEntityFieldTest::providerTestMakeUniqueEntityField()
  3. 11.x core/modules/migrate/tests/src/Unit/process/MakeUniqueEntityFieldTest.php \Drupal\Tests\migrate\Unit\process\MakeUniqueEntityFieldTest::providerTestMakeUniqueEntityField()

Data provider for testMakeUniqueEntityField().

File

core/modules/migrate/tests/src/Unit/process/MakeUniqueEntityFieldTest.php, line 121

Class

MakeUniqueEntityFieldTest
@coversDefaultClass \Drupal\migrate\Plugin\migrate\process\MakeUniqueEntityField @group migrate

Namespace

Drupal\Tests\migrate\Unit\process

Code

public static function providerTestMakeUniqueEntityField() {
    return [
        // Tests no duplication.
[
            0,
        ],
        // Tests no duplication and start position.
[
            0,
            NULL,
            10,
        ],
        // Tests no duplication, start position, and length.
[
            0,
            NULL,
            5,
            10,
        ],
        // Tests no duplication and length.
[
            0,
            NULL,
            NULL,
            10,
        ],
        // Tests duplication.
[
            3,
        ],
        // Tests duplication and start position.
[
            3,
            NULL,
            10,
        ],
        // Tests duplication, start position, and length.
[
            3,
            NULL,
            5,
            10,
        ],
        // Tests duplication and length.
[
            3,
            NULL,
            NULL,
            10,
        ],
        // Tests no duplication and postfix.
[
            0,
            '_',
        ],
        // Tests no duplication, postfix, and start position.
[
            0,
            '_',
            5,
        ],
        // Tests no duplication, postfix, start position, and length.
[
            0,
            '_',
            5,
            10,
        ],
        // Tests no duplication, postfix, and length.
[
            0,
            '_',
            NULL,
            10,
        ],
        // Tests duplication and postfix.
[
            2,
            '_',
        ],
        // Tests duplication, postfix, and start position.
[
            2,
            '_',
            5,
        ],
        // Tests duplication, postfix, start position, and length.
[
            2,
            '_',
            5,
            10,
        ],
        // Tests duplication, postfix, and length.
[
            2,
            '_',
            NULL,
            10,
        ],
    ];
}

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