|
|
@@ -54,7 +54,7 @@ class SchemaTest extends TestCase
|
|
|
|
|
|
$this->assertEquals(['name'], $schema->fields());
|
|
|
$res = $schema->field('name');
|
|
|
- $expected = ['type' => 'string', 'length' => null, 'precision' => null];
|
|
|
+ $expected = ['type' => 'string', 'length' => null, 'precision' => null, 'default' => null];
|
|
|
$this->assertEquals($expected, $res);
|
|
|
|
|
|
$res = $schema->addField('email', 'string');
|
|
|
@@ -62,7 +62,7 @@ class SchemaTest extends TestCase
|
|
|
|
|
|
$this->assertEquals(['name', 'email'], $schema->fields());
|
|
|
$res = $schema->field('email');
|
|
|
- $expected = ['type' => 'string', 'length' => null, 'precision' => null];
|
|
|
+ $expected = ['type' => 'string', 'length' => null, 'precision' => null, 'default' => null];
|
|
|
$this->assertEquals($expected, $res);
|
|
|
}
|
|
|
|
|
|
@@ -76,7 +76,7 @@ class SchemaTest extends TestCase
|
|
|
$schema = new Schema();
|
|
|
|
|
|
$schema->addField('name', ['derp' => 'derp', 'type' => 'string']);
|
|
|
- $expected = ['type' => 'string', 'length' => null, 'precision' => null];
|
|
|
+ $expected = ['type' => 'string', 'length' => null, 'precision' => null, 'default' => null];
|
|
|
$this->assertEquals($expected, $schema->field('name'));
|
|
|
}
|
|
|
|
|
|
@@ -134,8 +134,8 @@ class SchemaTest extends TestCase
|
|
|
$result = $schema->__debugInfo();
|
|
|
$expected = [
|
|
|
'_fields' => [
|
|
|
- 'name' => ['type' => 'string', 'length' => null, 'precision' => null],
|
|
|
- 'numbery' => ['type' => 'decimal', 'length' => null, 'precision' => null],
|
|
|
+ 'name' => ['type' => 'string', 'length' => null, 'precision' => null, 'default' => null],
|
|
|
+ 'numbery' => ['type' => 'decimal', 'length' => null, 'precision' => null, 'default' => null],
|
|
|
],
|
|
|
];
|
|
|
$this->assertEquals($expected, $result);
|