@@ -32,7 +32,7 @@ protected function formatDate(string $date): string
32
32
public function testSelectToFetchAll (): void
33
33
{
34
34
$ pdo = DBMock::mockPdo ();
35
- $ pdo ->shouldSelect ('select * from ` users` ' )
35
+ $ pdo ->shouldSelect ('select * from " users" ' )
36
36
->shouldFetchAllReturns ([[
37
37
'id ' => 1 ,
38
38
'name ' => 'John ' ,
@@ -56,7 +56,7 @@ public function testInsert(): void
56
56
57
57
$ pdo = DBMock::mockPdo ();
58
58
$ pdo ->shouldInsert (
59
- 'insert into ` users` (` name`, ` email`, ` updated_at`, ` created_at` ) values (?, ?, ?, ?) ' ,
59
+ 'insert into " users" (" name", " email", " updated_at", " created_at" ) values (?, ?, ?, ?) ' ,
60
60
[
'John ' ,
'[email protected] ' ,
'2020-01-01 00:00:00 ' ,
'2020-01-01 00:00:00 ' ]
61
61
);
62
62
$ pdo ->expects ('lastInsertId ' )->andReturn (2 );
@@ -79,7 +79,7 @@ public function testInsertUsingCallbackMatcher(): void
79
79
$ pdo = DBMock::mockPdo ();
80
80
$ pdo ->shouldInsert (
81
81
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 );
83
83
return true ;
84
84
}),
85
85
[
'John ' ,
'[email protected] ' ,
'2020-01-01 00:00:00 ' ,
'2020-01-01 00:00:00 ' ]
@@ -102,7 +102,7 @@ public function testUpdate(): void
102
102
Carbon::setTestNow ('2020-01-02 00:00:00 ' );
103
103
104
104
$ pdo = DBMock::mockPdo ();
105
- $ pdo->
shouldSelect (
'select * from ` users` where ` email` = ? limit 1 ' , [
'[email protected] ' ])
105
+ $ pdo->
shouldSelect (
'select * from " users" where " email" = ? limit 1 ' , [
'[email protected] ' ])
106
106
->shouldFetchAllReturns ([[
107
107
'id ' => 2 ,
108
108
'name ' => 'John ' ,
@@ -112,8 +112,8 @@ public function testUpdate(): void
112
112
]]);
113
113
$ pdo ->shouldUpdateOne (
114
114
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" = ? ' ,
117
117
[
'[email protected] ' ,
'2020-01-02 00:00:00 ' ,
2 ]
118
118
);
119
119
@@ -134,7 +134,7 @@ public function testUpdateWithReadReplica(): void
134
134
135
135
$ pdos = DBMock::mockEachPdo ();
136
136
$ pdos ->reader ()
137
- ->
shouldSelect (
'select * from ` users` where ` email` = ? limit 1 ' , [
'[email protected] ' ])
137
+ ->
shouldSelect (
'select * from " users" where " email" = ? limit 1 ' , [
'[email protected] ' ])
138
138
->shouldFetchAllReturns ([[
139
139
'id ' => 2 ,
140
140
'name ' => 'John ' ,
@@ -145,8 +145,8 @@ public function testUpdateWithReadReplica(): void
145
145
$ pdos ->writer ()
146
146
->shouldUpdateOne (
147
147
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" = ? ' ,
150
150
[
'[email protected] ' ,
'2020-01-02 00:00:00 ' ,
2 ]
151
151
);
152
152
@@ -168,11 +168,11 @@ public function testUpdateAndSelectInAnyOrder(): void
168
168
$ pdo = DBMock::mockPdo ()->inAnyOrder ();
169
169
$ pdo ->shouldUpdateOne (
170
170
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" = ? ' ,
173
173
[
'[email protected] ' ,
'2020-01-02 00:00:00 ' ,
2 ]
174
174
);
175
- $ pdo->
shouldSelect (
'select * from ` users` where ` email` = ? limit 1 ' , [
'[email protected] ' ])
175
+ $ pdo->
shouldSelect (
'select * from " users" where " email" = ? limit 1 ' , [
'[email protected] ' ])
176
176
->shouldFetchAllReturns ([[
177
177
'id ' => 2 ,
178
178
'name ' => 'John ' ,
0 commit comments