@@ -34,7 +34,7 @@ public function setUp()
3434 $ this ->Tags = TableRegistry::getTableLocator ()->get ('Itosho/EasyQuery.Tags ' );
3535 $ this ->Tags ->addBehavior ('Itosho/EasyQuery.Upsert ' , [
3636 'uniqueColumns ' => ['name ' ],
37- 'updateColumns ' => ['description ' , 'modified ' ]
37+ 'updateColumns ' => ['description ' , 'modified ' ],
3838 ]);
3939 }
4040
@@ -60,7 +60,7 @@ public function testUpsertByInsert()
6060 'name ' => 'tag4 ' ,
6161 'description ' => 'tag4 description ' ,
6262 'created ' => $ now ,
63- 'modified ' => $ now
63+ 'modified ' => $ now,
6464 ];
6565 $ entity = $ this ->Tags ->newEntity ($ record );
6666 $ actual = $ this ->Tags ->upsert ($ entity );
@@ -94,7 +94,7 @@ public function testUpsertByInsertAddTimestamp()
9494
9595 $ record = [
9696 'name ' => 'tag4 ' ,
97- 'description ' => 'tag4 description '
97+ 'description ' => 'tag4 description ' ,
9898 ];
9999 $ now = Chronos::now ();
100100 $ expectedRecord = $ record ;
@@ -133,7 +133,7 @@ public function testUpsertByUpdate()
133133 'name ' => 'tag1 ' ,
134134 'description ' => 'brand new tag1 description ' ,
135135 'created ' => '2017-10-01 00:00:00 ' ,
136- 'modified ' => '2017-10-01 00:00:00 '
136+ 'modified ' => '2017-10-01 00:00:00 ' ,
137137 ];
138138 $ entity = $ this ->Tags ->newEntity ($ record );
139139 $ actual = $ this ->Tags ->upsert ($ entity );
@@ -169,7 +169,7 @@ public function testUpsertByUpdateAddTimestamp()
169169
170170 $ record = [
171171 'name ' => 'tag1 ' ,
172- 'description ' => 'brand new tag1 description '
172+ 'description ' => 'brand new tag1 description ' ,
173173 ];
174174 $ now = Chronos::now ();
175175 $ currentCreated = '2017-09-01 00:00:00 ' ;
@@ -209,7 +209,7 @@ public function testUpsertNoBeforeSave()
209209 $ this ->Tags ->addBehavior ('Itosho/EasyQuery.Upsert ' , [
210210 'uniqueColumns ' => ['name ' ],
211211 'updateColumns ' => ['description ' , 'modified ' ],
212- 'event ' => ['beforeSave ' => false ]
212+ 'event ' => ['beforeSave ' => false ],
213213 ]);
214214 $ this ->Tags ->addBehavior ('Timestamp ' );
215215
@@ -245,14 +245,14 @@ public function testUpsertInvalidUpdateColumnsConfig()
245245 {
246246 $ this ->Tags ->removeBehavior ('Upsert ' );
247247 $ this ->Tags ->addBehavior ('Itosho/EasyQuery.Upsert ' , [
248- 'uniqueColumns ' => ['name ' ]
248+ 'uniqueColumns ' => ['name ' ],
249249 ]);
250250
251251 $ data = [
252252 'name ' => 'tag4 ' ,
253253 'description ' => 'tag4 description ' ,
254254 'created ' => '2017-09-01 00:00:00 ' ,
255- 'modified ' => '2017-09-01 00:00:00 '
255+ 'modified ' => '2017-09-01 00:00:00 ' ,
256256 ];
257257 $ entity = $ this ->Tags ->newEntity ($ data );
258258 $ this ->Tags ->upsert ($ entity );
@@ -269,14 +269,14 @@ public function testUpsertInvalidUniqueColumnsConfig()
269269 {
270270 $ this ->Tags ->removeBehavior ('Upsert ' );
271271 $ this ->Tags ->addBehavior ('Itosho/EasyQuery.Upsert ' , [
272- 'updateColumns ' => ['description ' , 'modified ' ]
272+ 'updateColumns ' => ['description ' , 'modified ' ],
273273 ]);
274274
275275 $ data = [
276276 'name ' => 'tag4 ' ,
277277 'description ' => 'tag4 description ' ,
278278 'created ' => '2017-09-01 00:00:00 ' ,
279- 'modified ' => '2017-09-01 00:00:00 '
279+ 'modified ' => '2017-09-01 00:00:00 ' ,
280280 ];
281281 $ entity = $ this ->Tags ->newEntity ($ data );
282282 $ this ->Tags ->upsert ($ entity );
@@ -291,7 +291,7 @@ public function testBulkUpsertByInsert()
291291 {
292292 $ this ->Tags ->removeBehavior ('Upsert ' );
293293 $ this ->Tags ->addBehavior ('Itosho/EasyQuery.Upsert ' , [
294- 'updateColumns ' => ['description ' , 'modified ' ]
294+ 'updateColumns ' => ['description ' , 'modified ' ],
295295 ]);
296296
297297 $ records = $ this ->getBaseInsertRecords ();
@@ -319,7 +319,7 @@ public function testBulkUpsertByInsertAddTimestamp()
319319 {
320320 $ this ->Tags ->removeBehavior ('Upsert ' );
321321 $ this ->Tags ->addBehavior ('Itosho/EasyQuery.Upsert ' , [
322- 'updateColumns ' => ['description ' , 'modified ' ]
322+ 'updateColumns ' => ['description ' , 'modified ' ],
323323 ]);
324324 $ this ->Tags ->addBehavior ('Timestamp ' );
325325
@@ -349,7 +349,7 @@ public function testBulkUpsertByUpdate()
349349 {
350350 $ this ->Tags ->removeBehavior ('Upsert ' );
351351 $ this ->Tags ->addBehavior ('Itosho/EasyQuery.Upsert ' , [
352- 'updateColumns ' => ['description ' , 'modified ' ]
352+ 'updateColumns ' => ['description ' , 'modified ' ],
353353 ]);
354354
355355 $ records = $ this ->getBaseUpdateRecords ();
@@ -379,7 +379,7 @@ public function testBulkUpsertByUpdateAddTimestamp()
379379 {
380380 $ this ->Tags ->removeBehavior ('Upsert ' );
381381 $ this ->Tags ->addBehavior ('Itosho/EasyQuery.Upsert ' , [
382- 'updateColumns ' => ['description ' , 'modified ' ]
382+ 'updateColumns ' => ['description ' , 'modified ' ],
383383 ]);
384384 $ this ->Tags ->addBehavior ('Timestamp ' );
385385
@@ -411,7 +411,7 @@ public function testBulkUpsertNoBeforeSave()
411411 $ this ->Tags ->removeBehavior ('Upsert ' );
412412 $ this ->Tags ->addBehavior ('Itosho/EasyQuery.Upsert ' , [
413413 'updateColumns ' => ['description ' , 'modified ' ],
414- 'event ' => ['beforeSave ' => false ]
414+ 'event ' => ['beforeSave ' => false ],
415415 ]);
416416 $ this ->Tags ->addBehavior ('Timestamp ' );
417417
@@ -465,7 +465,7 @@ public function testBulkUpsertNoSaveData()
465465 {
466466 $ this ->Tags ->removeBehavior ('Upsert ' );
467467 $ this ->Tags ->addBehavior ('Itosho/EasyQuery.Upsert ' , [
468- 'updateColumns ' => ['description ' , 'modified ' ]
468+ 'updateColumns ' => ['description ' , 'modified ' ],
469469 ]);
470470
471471 $ this ->Tags ->bulkUpsert ([]);
@@ -481,15 +481,15 @@ private function getBaseInsertRecords()
481481 return [
482482 [
483483 'name ' => 'tag4 ' ,
484- 'description ' => 'tag4 description '
484+ 'description ' => 'tag4 description ' ,
485485 ],
486486 [
487487 'name ' => 'tag5 ' ,
488- 'description ' => 'tag5 description '
488+ 'description ' => 'tag5 description ' ,
489489 ],
490490 [
491491 'name ' => 'tag6 ' ,
492- 'description ' => 'tag6 description '
492+ 'description ' => 'tag6 description ' ,
493493 ]
494494 ];
495495 }
@@ -504,15 +504,15 @@ private function getBaseUpdateRecords()
504504 return [
505505 [
506506 'name ' => 'tag1 ' ,
507- 'description ' => 'brand new tag1 description '
507+ 'description ' => 'brand new tag1 description ' ,
508508 ],
509509 [
510510 'name ' => 'tag2 ' ,
511- 'description ' => 'brand new tag2 description '
511+ 'description ' => 'brand new tag2 description ' ,
512512 ],
513513 [
514514 'name ' => 'tag3 ' ,
515- 'description ' => 'brand new tag3 description '
515+ 'description ' => 'brand new tag3 description ' ,
516516 ]
517517 ];
518518 }
0 commit comments