You are here

public function SqlContentEntityStorageSchemaTest::testCastValue in Drupal 8

Tests various value casts depending on column schema.

@dataProvider providerSchemaCastValue @covers ::castValue

Parameters

mixed $expected: The expected value.

mixed $value: The tested value.

array $schema: The schema for the table column.

File

core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageSchemaTest.php, line 1579

Class

SqlContentEntityStorageSchemaTest
@coversDefaultClass \Drupal\Core\Entity\Sql\SqlContentEntityStorageSchema @group Entity

Namespace

Drupal\Tests\Core\Entity\Sql

Code

public function testCastValue($expected, $value, array $schema) {
  $this
    ->assertSame($expected, SqlContentEntityStorageSchema::castValue($schema, $value));
}