public function JsonItemTest::testSchemaSize in JSON Field 8
@dataProvider providerTestSchemaSize
File
- tests/
src/ Kernel/ JsonItemTest.php, line 108
Class
- JsonItemTest
- @coversDefaultClass \Drupal\json_field\Plugin\Field\FieldType\JSONItem
Namespace
Drupal\Tests\json_field\KernelCode
public function testSchemaSize($size, array $expected) {
$storage = [
'settings' => [
'size' => $size,
],
];
$this
->createTestField($storage);
$schema = $this
->getTableSchema(\Drupal::database(), 'entity_test__test_json_field');
$this
->assertEquals($expected, $schema['fields']['test_json_field_value']);
}