You are here

public function JsonItemTest::providerTestSchemaSize in JSON Field 8

Data provider.

See also

testSchemaSize()

File

tests/src/Kernel/JsonItemTest.php, line 125

Class

JsonItemTest
@coversDefaultClass \Drupal\json_field\Plugin\Field\FieldType\JSONItem

Namespace

Drupal\Tests\json_field\Kernel

Code

public function providerTestSchemaSize() {
  $data = [];
  $data[] = [
    JSONItem::SIZE_SMALL,
    [
      'type' => 'varchar',
      'not null' => 1,
      'length' => 255,
    ],
  ];
  $data[] = [
    JSONItem::SIZE_NORMAL,
    [
      'type' => 'text',
      'not null' => 1,
      'size' => 'normal',
    ],
  ];
  $data[] = [
    JSONItem::SIZE_MEDIUM,
    [
      'type' => 'text',
      'not null' => 1,
      'size' => 'medium',
    ],
  ];
  $data[] = [
    JSONItem::SIZE_BIG,
    [
      'type' => 'text',
      'not null' => 1,
      'size' => 'big',
    ],
  ];
  return $data;
}