Skip to content
This repository has been archived by the owner on Sep 27, 2021. It is now read-only.

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
qurben committed Nov 25, 2018
1 parent 79b33e4 commit 354899e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tests/Entity/PersistentAttributeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public function testToSql() {
$this->assertEquals('one int(11) NOT NULL DEFAULT "11"', $attribute->toSQL());

$attribute = new PersistentAttribute('one', [T::Text, true, 'auto_increment']);
$this->assertEquals('one text NULL DEFAULT NULL auto_increment', $attribute->toSQL());
$this->assertEquals('one mediumtext NULL DEFAULT NULL auto_increment', $attribute->toSQL());

$attribute = new PersistentAttribute('one', [T::Enumeration, false, 'MyEnum']);
$this->assertEquals('one enum(\'option1\',\'option2\',\'option3\') NOT NULL', $attribute->toSQL());
Expand Down
4 changes: 2 additions & 2 deletions tests/Persistence/QueryBuilderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,12 @@ public function testBuildCreateTable() {
$attribute_three = new PersistentAttribute('three', [T::Text, true]);

$this->assertEquals(
"CREATE TABLE one (two int(11) NOT NULL, three text NULL DEFAULT NULL) ENGINE=InnoDB DEFAULT CHARSET=utf8 auto_increment=1;",
"CREATE TABLE one (two int(11) NOT NULL, three mediumtext NULL DEFAULT NULL) ENGINE=InnoDB DEFAULT CHARSET=utf8 auto_increment=1;",
$query_builder->buildCreateTable('one', [$attribute_two, $attribute_three], [])
);

$this->assertEquals(
"CREATE TABLE one (two int(11) NOT NULL, three text NULL DEFAULT NULL, PRIMARY KEY (two)) ENGINE=InnoDB DEFAULT CHARSET=utf8 auto_increment=1;",
"CREATE TABLE one (two int(11) NOT NULL, three mediumtext NULL DEFAULT NULL, PRIMARY KEY (two)) ENGINE=InnoDB DEFAULT CHARSET=utf8 auto_increment=1;",
$query_builder->buildCreateTable('one', [$attribute_two, $attribute_three], ['two'])
);

Expand Down

0 comments on commit 354899e

Please sign in to comment.