|
|
@@ -395,7 +395,10 @@ class EntityContextTest extends TestCase
|
|
|
$this->assertSame('string', $context->type('99.title'));
|
|
|
$this->assertNull($context->type('0.nope'));
|
|
|
|
|
|
- $expected = ['length' => 255, 'precision' => null];
|
|
|
+ $expected = [
|
|
|
+ 'length' => 255, 'precision' => null, 'type' => 'string',
|
|
|
+ 'null' => null, 'default' => null, 'comment' => null, 'collate' => null,
|
|
|
+ ];
|
|
|
$this->assertEquals($expected, $context->attributes('0.user.username'));
|
|
|
}
|
|
|
|
|
|
@@ -1117,22 +1120,26 @@ class EntityContextTest extends TestCase
|
|
|
]);
|
|
|
|
|
|
$expected = [
|
|
|
- 'length' => 255, 'precision' => null,
|
|
|
+ 'length' => 255, 'precision' => null, 'type' => 'string',
|
|
|
+ 'null' => null, 'default' => null, 'comment' => null, 'collate' => null,
|
|
|
];
|
|
|
$this->assertEquals($expected, $context->attributes('title'));
|
|
|
|
|
|
$expected = [
|
|
|
- 'length' => null, 'precision' => null,
|
|
|
+ 'length' => null, 'precision' => null, 'type' => 'crazy_text',
|
|
|
+ 'null' => null, 'default' => null, 'comment' => null,
|
|
|
];
|
|
|
$this->assertEquals($expected, $context->attributes('body'));
|
|
|
|
|
|
$expected = [
|
|
|
- 'length' => 10, 'precision' => 3,
|
|
|
+ 'length' => 10, 'precision' => 3, 'type' => 'decimal',
|
|
|
+ 'null' => null, 'default' => null, 'comment' => null, 'unsigned' => null,
|
|
|
];
|
|
|
$this->assertEquals($expected, $context->attributes('user.rating'));
|
|
|
|
|
|
$expected = [
|
|
|
- 'length' => 11, 'precision' => null,
|
|
|
+ 'length' => 11, 'precision' => null, 'type' => 'integer',
|
|
|
+ 'null' => false, 'default' => null, 'comment' => null, 'unsigned' => null, 'autoIncrement' => null,
|
|
|
];
|
|
|
$this->assertEquals($expected, $context->attributes('tags.0._joinData.article_id'));
|
|
|
}
|