@@ -32,7 +32,7 @@ protected function formatDate(string $date): string
3232 public function testSelectToFetchAll (): void
3333 {
3434 $ pdo = DBMock::mockPdo ();
35- $ pdo ->shouldSelect ('select * from ` users` ' )
35+ $ pdo ->shouldSelect ('select * from " users" ' )
3636 ->shouldFetchAllReturns ([[
3737 'id ' => 1 ,
3838 'name ' => 'John ' ,
@@ -56,7 +56,7 @@ public function testInsert(): void
5656
5757 $ pdo = DBMock::mockPdo ();
5858 $ pdo ->shouldInsert (
59- 'insert into ` users` (` name`, ` email`, ` updated_at`, ` created_at` ) values (?, ?, ?, ?) ' ,
59+ 'insert into " users" (" name", " email", " updated_at", " created_at" ) values (?, ?, ?, ?) ' ,
6060 ['John ' , 'john@example.com ' , '2020-01-01 00:00:00 ' , '2020-01-01 00:00:00 ' ]
6161 );
6262 $ pdo ->expects ('lastInsertId ' )->andReturn (2 );
@@ -79,7 +79,7 @@ public function testInsertUsingCallbackMatcher(): void
7979 $ pdo = DBMock::mockPdo ();
8080 $ pdo ->shouldInsert (
8181 Mockery::on (function (string $ sql ) {
82- $ this ->assertSame ('insert into ` users` (` name`, ` email`, ` updated_at`, ` created_at` ) values (?, ?, ?, ?) ' , $ sql );
82+ $ this ->assertSame ('insert into " users" (" name", " email", " updated_at", " created_at" ) values (?, ?, ?, ?) ' , $ sql );
8383 return true ;
8484 }),
8585 ['John ' , 'john@example.com ' , '2020-01-01 00:00:00 ' , '2020-01-01 00:00:00 ' ]
@@ -102,7 +102,7 @@ public function testUpdate(): void
102102 Carbon::setTestNow ('2020-01-02 00:00:00 ' );
103103
104104 $ pdo = DBMock::mockPdo ();
105- $ pdo ->shouldSelect ('select * from ` users` where ` email` = ? limit 1 ' , ['john@example.com ' ])
105+ $ pdo ->shouldSelect ('select * from " users" where " email" = ? limit 1 ' , ['john@example.com ' ])
106106 ->shouldFetchAllReturns ([[
107107 'id ' => 2 ,
108108 'name ' => 'John ' ,
@@ -112,8 +112,8 @@ public function testUpdate(): void
112112 ]]);
113113 $ pdo ->shouldUpdateOne (
114114 version_compare ($ this ->app ->version (), '5.8 ' , '< ' )
115- ? 'update ` users` set ` email` = ?, ` updated_at` = ? where `id` = ? '
116- : 'update ` users` set ` email` = ?, ` users`.` updated_at` = ? where `id` = ? ' ,
115+ ? 'update " users" set " email" = ?, " updated_at" = ? where "id" = ? '
116+ : 'update " users" set " email" = ?, " users"." updated_at" = ? where "id" = ? ' ,
117117 ['john-01@example.com ' , '2020-01-02 00:00:00 ' , 2 ]
118118 );
119119
@@ -134,7 +134,7 @@ public function testUpdateWithReadReplica(): void
134134
135135 $ pdos = DBMock::mockEachPdo ();
136136 $ pdos ->reader ()
137- ->shouldSelect ('select * from ` users` where ` email` = ? limit 1 ' , ['john@example.com ' ])
137+ ->shouldSelect ('select * from " users" where " email" = ? limit 1 ' , ['john@example.com ' ])
138138 ->shouldFetchAllReturns ([[
139139 'id ' => 2 ,
140140 'name ' => 'John ' ,
@@ -145,8 +145,8 @@ public function testUpdateWithReadReplica(): void
145145 $ pdos ->writer ()
146146 ->shouldUpdateOne (
147147 version_compare ($ this ->app ->version (), '5.8 ' , '< ' )
148- ? 'update ` users` set ` email` = ?, ` updated_at` = ? where `id` = ? '
149- : 'update ` users` set ` email` = ?, ` users`.` updated_at` = ? where `id` = ? ' ,
148+ ? 'update " users" set " email" = ?, " updated_at" = ? where "id" = ? '
149+ : 'update " users" set " email" = ?, " users"." updated_at" = ? where "id" = ? ' ,
150150 ['john-01@example.com ' , '2020-01-02 00:00:00 ' , 2 ]
151151 );
152152
@@ -168,11 +168,11 @@ public function testUpdateAndSelectInAnyOrder(): void
168168 $ pdo = DBMock::mockPdo ()->inAnyOrder ();
169169 $ pdo ->shouldUpdateOne (
170170 version_compare ($ this ->app ->version (), '5.8 ' , '< ' )
171- ? 'update ` users` set ` email` = ?, ` updated_at` = ? where `id` = ? '
172- : 'update ` users` set ` email` = ?, ` users`.` updated_at` = ? where `id` = ? ' ,
171+ ? 'update " users" set " email" = ?, " updated_at" = ? where "id" = ? '
172+ : 'update " users" set " email" = ?, " users"." updated_at" = ? where "id" = ? ' ,
173173 ['john-01@example.com ' , '2020-01-02 00:00:00 ' , 2 ]
174174 );
175- $ pdo ->shouldSelect ('select * from ` users` where ` email` = ? limit 1 ' , ['john@example.com ' ])
175+ $ pdo ->shouldSelect ('select * from " users" where " email" = ? limit 1 ' , ['john@example.com ' ])
176176 ->shouldFetchAllReturns ([[
177177 'id ' => 2 ,
178178 'name ' => 'John ' ,
0 commit comments