function SchemaDefinitionTest::testNullDefaultForIntColumn

Tests passing a null default to an int column.

File

core/tests/Drupal/Tests/Core/Database/SchemaDefinitionTest.php, line 276

Class

SchemaDefinitionTest
Tests SchemaDefinition Column object validations.

Namespace

Drupal\Tests\Core\Database

Code

public function testNullDefaultForIntColumn() : void {
  $table = new Table(name: 'test', columns: [
    Column::int(name: 'id', default: new NullValue()),
  ], primaryKey: new PrimaryKey([
    'id',
  ]));
  $this->assertInstanceOf(Table::class, $table);
}

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