function FieldStorageConfigEntityUnitTest::providerInvalidEnforcedCardinality

Same name in other branches
  1. 9 core/modules/field/tests/src/Unit/FieldStorageConfigEntityUnitTest.php \Drupal\Tests\field\Unit\FieldStorageConfigEntityUnitTest::providerInvalidEnforcedCardinality()
  2. 8.9.x core/modules/field/tests/src/Unit/FieldStorageConfigEntityUnitTest.php \Drupal\Tests\field\Unit\FieldStorageConfigEntityUnitTest::providerInvalidEnforcedCardinality()
  3. 10 core/modules/field/tests/src/Unit/FieldStorageConfigEntityUnitTest.php \Drupal\Tests\field\Unit\FieldStorageConfigEntityUnitTest::providerInvalidEnforcedCardinality()

Data provider for ::testInvalidEnforcedCardinality()

Return value

array Test cases.

File

core/modules/field/tests/src/Unit/FieldStorageConfigEntityUnitTest.php, line 205

Class

FieldStorageConfigEntityUnitTest
@coversDefaultClass \Drupal\field\Entity\FieldStorageConfig

Namespace

Drupal\Tests\field\Unit

Code

public static function providerInvalidEnforcedCardinality() {
    return [
        'zero' => [
            0,
        ],
        'negative_other_than_-1' => [
            -70,
        ],
        'non_numeric' => [
            'abc%$#@!',
        ],
    ];
}

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