Skip to content

Commit 70792e1

Browse files
committed
Fixed test cases
1 parent 32b5078 commit 70792e1

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

tests/TestCase/Database/Schema/SqlserverSchemaTest.php

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,8 @@ public function testDescribeTable() {
209209
'default' => null,
210210
'length' => 20,
211211
'precision' => null,
212-
'fixed' => null,
212+
'unsigned' => null,
213+
'autoIncrement' => null,
213214
'comment' => null,
214215
],
215216
'title' => [
@@ -236,7 +237,8 @@ public function testDescribeTable() {
236237
'default' => null,
237238
'length' => 10,
238239
'precision' => null,
239-
'fixed' => null,
240+
'unsigned' => null,
241+
'autoIncrement' => null,
240242
'comment' => null,
241243
],
242244
'published' => [
@@ -245,7 +247,6 @@ public function testDescribeTable() {
245247
'default' => 0,
246248
'length' => null,
247249
'precision' => null,
248-
'fixed' => null,
249250
'comment' => null,
250251
],
251252
'views' => [
@@ -254,7 +255,8 @@ public function testDescribeTable() {
254255
'default' => 0,
255256
'length' => 5,
256257
'precision' => null,
257-
'fixed' => null,
258+
'unsigned' => null,
259+
'autoIncrement' => null,
258260
'comment' => null,
259261
],
260262
'created' => [
@@ -263,13 +265,12 @@ public function testDescribeTable() {
263265
'default' => null,
264266
'length' => null,
265267
'precision' => null,
266-
'fixed' => null,
267268
'comment' => null,
268269
],
269270
];
270271
$this->assertEquals(['id'], $result->primaryKey());
271272
foreach ($expected as $field => $definition) {
272-
$this->assertEquals($definition, $result->column($field));
273+
$this->assertEquals($definition, $result->column($field), 'Failed to match field ' . $field);
273274
}
274275
}
275276

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

571572
$this->assertCount(2, $result);
572-
$this->assertEquals($expected, $result[0]);
573+
$this->assertEquals(str_replace("\r\n", "\n", $expected), str_replace("\r\n", "\n", $result[0]));
573574
$this->assertEquals(
574575
'CREATE INDEX [title_idx] ON [schema_articles] ([title])',
575576
$result[1]

0 commit comments

Comments
 (0)