public function PaymentReferenceTest::testSchema in Payment 8.2
@covers ::schema
File
- modules/
payment_reference/ tests/ src/ Unit/ Plugin/ Field/ FieldType/ PaymentReferenceTest.php, line 102
Class
- PaymentReferenceTest
- @coversDefaultClass \Drupal\payment_reference\Plugin\Field\FieldType\PaymentReference
Namespace
Drupal\Tests\payment_reference\Unit\Plugin\Field\FieldTypeCode
public function testSchema() {
$field_storage_definition = $this
->createMock(FieldStorageDefinitionInterface::class);
$schema = $this->sut
->schema($field_storage_definition);
$this
->assertIsArray($schema);
$this
->arrayHasKey('columns', $schema);
$this
->assertIsArray($schema['columns']);
$this
->arrayHasKey('indexes', $schema);
$this
->assertIsArray($schema['indexes']);
$this
->arrayHasKey('foreign keys', $schema);
$this
->assertIsArray($schema['foreign keys']);
}