Skip to content

Commit

Permalink
Ensure tests use a cross DBMS compatible schema.
Browse files Browse the repository at this point in the history
  • Loading branch information
ndm2 committed Feb 17, 2017
1 parent 10596b8 commit 34e356c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/TestCase/View/Form/EntityContextTest.php
Expand Up @@ -1073,7 +1073,7 @@ public function testAttributes()
$this->assertEquals($expected, $context->attributes('user.rating'));

$expected = [
'length' => null, 'precision' => null
'length' => 11, 'precision' => null
];
$this->assertEquals($expected, $context->attributes('tags.0._joinData.article_id'));
}
Expand Down Expand Up @@ -1254,6 +1254,11 @@ protected function _setupTables()
'body' => ['type' => 'crazy_text', 'baseType' => 'text'],
'_constraints' => ['primary' => ['type' => 'primary', 'columns' => ['id']]],
]);
$articles->Tags->junction()->schema([
'article_id' => ['type' => 'integer', 'length' => 11, 'null' => false],
'tag_id' => ['type' => 'integer', 'length' => 11, 'null' => false],
'_constraints' => ['unique_tag' => ['type' => 'primary', 'columns' => ['article_id', 'tag_id']]]
]);
$users->schema([
'id' => ['type' => 'integer', 'length' => 11],
'username' => ['type' => 'string', 'length' => 255],
Expand Down

0 comments on commit 34e356c

Please sign in to comment.