Skip to content

Commit

Permalink
Using correct quotation marks.
Browse files Browse the repository at this point in the history
  • Loading branch information
chinpei215 committed Feb 28, 2016
1 parent 94e84db commit 549c0bd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions tests/TestCase/Database/Schema/MysqlSchemaTest.php
Expand Up @@ -448,7 +448,7 @@ public static function columnSqlProvider()
[
'role',
['type' => 'string', 'length' => 10, 'null' => false, 'default' => 'admin'],
'`role` VARCHAR(10) NOT NULL DEFAULT "admin"'
'`role` VARCHAR(10) NOT NULL DEFAULT \'admin\''
],
[
'title',
Expand Down Expand Up @@ -544,7 +544,7 @@ public static function columnSqlProvider()
[
'created',
['type' => 'datetime', 'comment' => 'Created timestamp'],
'`created` DATETIME COMMENT "Created timestamp"'
'`created` DATETIME COMMENT \'Created timestamp\''
],
// Date & Time
[
Expand Down Expand Up @@ -884,7 +884,7 @@ public function testCreateSql()
$expected = <<<SQL
CREATE TABLE `posts` (
`id` INTEGER NOT NULL AUTO_INCREMENT,
`title` VARCHAR(255) NOT NULL COMMENT "The title",
`title` VARCHAR(255) NOT NULL COMMENT 'The title',
`body` TEXT,
`created` DATETIME,
PRIMARY KEY (`id`)
Expand Down Expand Up @@ -1040,7 +1040,7 @@ protected function _getMockedDriver()
$mock->expects($this->any())
->method('quote')
->will($this->returnCallback(function ($value) {
return '"' . $value . '"';
return '\'' . $value . '\'';
}));
$mock->expects($this->any())
->method('quoteIdentifier')
Expand Down
6 changes: 3 additions & 3 deletions tests/TestCase/Database/Schema/PostgresSchemaTest.php
Expand Up @@ -615,7 +615,7 @@ public static function columnSqlProvider()
[
'role',
['type' => 'string', 'length' => 10, 'null' => false, 'default' => 'admin'],
'"role" VARCHAR(10) NOT NULL DEFAULT "admin"'
'"role" VARCHAR(10) NOT NULL DEFAULT \'admin\''
],
[
'title',
Expand Down Expand Up @@ -987,7 +987,7 @@ public function testCreateSql()
$result[1]
);
$this->assertEquals(
'COMMENT ON COLUMN "schema_articles"."title" IS "This is the title"',
'COMMENT ON COLUMN "schema_articles"."title" IS \'This is the title\'',
$result[2]
);
}
Expand Down Expand Up @@ -1129,7 +1129,7 @@ protected function _getMockedDriver()
$mock->expects($this->any())
->method('quote')
->will($this->returnCallback(function ($value) {
return '"' . $value . '"';
return '\'' . $value . '\'';
}));
$mock->expects($this->any())
->method('quoteIdentifier')
Expand Down

0 comments on commit 549c0bd

Please sign in to comment.