@@ -151,8 +151,8 @@ public function testFindAllNoFields() {
151
151
$ table = new Table (['table ' => 'things ' , 'connection ' => $ this ->connection ]);
152
152
$ results = $ table ->find ('all ' )->toArray ();
153
153
$ expected = [
154
- ['things ' => [ ' id ' => 1 , 'title ' => 'a title ' , 'body ' => 'a body ' ] ],
155
- ['things ' => [ ' id ' => 2 , 'title ' => 'another title ' , 'body ' => 'another body ' ] ]
154
+ ['id ' => 1 , 'title ' => 'a title ' , 'body ' => 'a body ' ],
155
+ ['id ' => 2 , 'title ' => 'another title ' , 'body ' => 'another body ' ]
156
156
];
157
157
$ this ->assertSame ($ expected , $ results );
158
158
}
@@ -162,15 +162,15 @@ public function testFindAllSomeFields() {
162
162
$ table = new Table (['table ' => 'things ' , 'connection ' => $ this ->connection ]);
163
163
$ results = $ table ->find ('all ' )->select (['id ' , 'title ' ])->toArray ();
164
164
$ expected = [
165
- ['things ' => [ ' id ' => 1 , 'title ' => 'a title ' ] ],
166
- ['things ' => [ ' id ' => 2 , 'title ' => 'another title ' ] ]
165
+ ['id ' => 1 , 'title ' => 'a title ' ],
166
+ ['id ' => 2 , 'title ' => 'another title ' ]
167
167
];
168
168
$ this ->assertSame ($ expected , $ results );
169
169
170
170
$ results = $ table ->find ('all ' )->select (['id ' , 'foo ' => 'title ' ])->toArray ();
171
171
$ expected = [
172
- ['things ' => [ ' id ' => 1 , 'foo ' => 'a title ' ] ],
173
- ['things ' => [ ' id ' => 2 , 'foo ' => 'another title ' ] ]
172
+ ['id ' => 1 , 'foo ' => 'a title ' ],
173
+ ['id ' => 2 , 'foo ' => 'another title ' ]
174
174
];
175
175
$ this ->assertSame ($ expected , $ results );
176
176
}
@@ -182,14 +182,14 @@ public function testFindAllConditionAutoTypes() {
182
182
->select (['id ' , 'name ' ])
183
183
->where (['posted >= ' => new \DateTime ('2012-12-22 12:01 ' )]);
184
184
$ expected = [
185
- ['dates ' => [ ' id ' => 3 , 'name ' => 'Jet Li ' ] ]
185
+ ['id ' => 3 , 'name ' => 'Jet Li ' ]
186
186
];
187
187
$ this ->assertSame ($ expected , $ query ->toArray ());
188
188
189
189
$ query ->orWhere (['dates.posted ' => new \DateTime ('2012-12-22 12:00 ' )]);
190
190
$ expected = [
191
- ['dates ' => [ ' id ' => 2 , 'name ' => 'Bruce Lee ' ] ],
192
- ['dates ' => [ ' id ' => 3 , 'name ' => 'Jet Li ' ] ]
191
+ ['id ' => 2 , 'name ' => 'Bruce Lee ' ],
192
+ ['id ' => 3 , 'name ' => 'Jet Li ' ]
193
193
];
194
194
$ this ->assertSame ($ expected , $ query ->toArray ());
195
195
}
0 commit comments