Skip to content

Commit

Permalink
Fixed test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
jrbasso committed Jan 19, 2014
1 parent 32b5078 commit 70792e1
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions tests/TestCase/Database/Schema/SqlserverSchemaTest.php
Expand Up @@ -209,7 +209,8 @@ public function testDescribeTable() {
'default' => null,
'length' => 20,
'precision' => null,
'fixed' => null,
'unsigned' => null,
'autoIncrement' => null,
'comment' => null,
],
'title' => [
Expand All @@ -236,7 +237,8 @@ public function testDescribeTable() {
'default' => null,
'length' => 10,
'precision' => null,
'fixed' => null,
'unsigned' => null,
'autoIncrement' => null,
'comment' => null,
],
'published' => [
Expand All @@ -245,7 +247,6 @@ public function testDescribeTable() {
'default' => 0,
'length' => null,
'precision' => null,
'fixed' => null,
'comment' => null,
],
'views' => [
Expand All @@ -254,7 +255,8 @@ public function testDescribeTable() {
'default' => 0,
'length' => 5,
'precision' => null,
'fixed' => null,
'unsigned' => null,
'autoIncrement' => null,
'comment' => null,
],
'created' => [
Expand All @@ -263,13 +265,12 @@ public function testDescribeTable() {
'default' => null,
'length' => null,
'precision' => null,
'fixed' => null,
'comment' => null,
],
];
$this->assertEquals(['id'], $result->primaryKey());
foreach ($expected as $field => $definition) {
$this->assertEquals($definition, $result->column($field));
$this->assertEquals($definition, $result->column($field), 'Failed to match field ' . $field);
}
}

Expand Down Expand Up @@ -569,7 +570,7 @@ public function testCreateSql() {
$result = $table->createSql($connection);

$this->assertCount(2, $result);
$this->assertEquals($expected, $result[0]);
$this->assertEquals(str_replace("\r\n", "\n", $expected), str_replace("\r\n", "\n", $result[0]));
$this->assertEquals(
'CREATE INDEX [title_idx] ON [schema_articles] ([title])',
$result[1]
Expand Down

0 comments on commit 70792e1

Please sign in to comment.