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
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ public static function columnSqlProvider()
[ [
'role', 'role',
['type' => 'string', 'length' => 10, 'null' => false, 'default' => 'admin'], ['type' => 'string', 'length' => 10, 'null' => false, 'default' => 'admin'],
'`role` VARCHAR(10) NOT NULL DEFAULT "admin"' '`role` VARCHAR(10) NOT NULL DEFAULT \'admin\''
], ],
[ [
'title', 'title',
Expand Down Expand Up @@ -544,7 +544,7 @@ public static function columnSqlProvider()
[ [
'created', 'created',
['type' => 'datetime', 'comment' => 'Created timestamp'], ['type' => 'datetime', 'comment' => 'Created timestamp'],
'`created` DATETIME COMMENT "Created timestamp"' '`created` DATETIME COMMENT \'Created timestamp\''
], ],
// Date & Time // Date & Time
[ [
Expand Down Expand Up @@ -884,7 +884,7 @@ public function testCreateSql()
$expected = <<<SQL $expected = <<<SQL
CREATE TABLE `posts` ( CREATE TABLE `posts` (
`id` INTEGER NOT NULL AUTO_INCREMENT, `id` INTEGER NOT NULL AUTO_INCREMENT,
`title` VARCHAR(255) NOT NULL COMMENT "The title", `title` VARCHAR(255) NOT NULL COMMENT 'The title',
`body` TEXT, `body` TEXT,
`created` DATETIME, `created` DATETIME,
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
Expand Down Expand Up @@ -1040,7 +1040,7 @@ protected function _getMockedDriver()
$mock->expects($this->any()) $mock->expects($this->any())
->method('quote') ->method('quote')
->will($this->returnCallback(function ($value) { ->will($this->returnCallback(function ($value) {
return '"' . $value . '"'; return '\'' . $value . '\'';
})); }));
$mock->expects($this->any()) $mock->expects($this->any())
->method('quoteIdentifier') ->method('quoteIdentifier')
Expand Down
6 changes: 3 additions & 3 deletions tests/TestCase/Database/Schema/PostgresSchemaTest.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -615,7 +615,7 @@ public static function columnSqlProvider()
[ [
'role', 'role',
['type' => 'string', 'length' => 10, 'null' => false, 'default' => 'admin'], ['type' => 'string', 'length' => 10, 'null' => false, 'default' => 'admin'],
'"role" VARCHAR(10) NOT NULL DEFAULT "admin"' '"role" VARCHAR(10) NOT NULL DEFAULT \'admin\''
], ],
[ [
'title', 'title',
Expand Down Expand Up @@ -987,7 +987,7 @@ public function testCreateSql()
$result[1] $result[1]
); );
$this->assertEquals( $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] $result[2]
); );
} }
Expand Down Expand Up @@ -1129,7 +1129,7 @@ protected function _getMockedDriver()
$mock->expects($this->any()) $mock->expects($this->any())
->method('quote') ->method('quote')
->will($this->returnCallback(function ($value) { ->will($this->returnCallback(function ($value) {
return '"' . $value . '"'; return '\'' . $value . '\'';
})); }));
$mock->expects($this->any()) $mock->expects($this->any())
->method('quoteIdentifier') ->method('quoteIdentifier')
Expand Down

0 comments on commit 549c0bd

Please sign in to comment.