File tree Expand file tree Collapse file tree 4 files changed +8
-8
lines changed
Expand file tree Collapse file tree 4 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -2237,8 +2237,8 @@ public function testBulkInsertDates()
22372237 $ rows = $ this ->adapter ->fetchAll ('SELECT * FROM table1 ' );
22382238 $ this ->assertEquals ('foo ' , $ rows [0 ]['name ' ]);
22392239 $ this ->assertEquals ('bar ' , $ rows [1 ]['name ' ]);
2240- $ this ->assertMatchesRegularExpression (' /[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}/ ' , $ rows [0 ]['created ' ]);
2241- $ this ->assertMatchesRegularExpression (' /[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}/ ' , $ rows [1 ]['created ' ]);
2240+ $ this ->assertMatchesRegularExpression ($ data [ 0 ][ ' created ' ]-> toDateTimeString () , $ rows [0 ]['created ' ]);
2241+ $ this ->assertMatchesRegularExpression ($ data [ 1 ][ ' created ' ]-> toDateTimeString () , $ rows [1 ]['created ' ]);
22422242 }
22432243
22442244 public function testInsertData ()
Original file line number Diff line number Diff line change @@ -2469,8 +2469,8 @@ public function testBulkInsertDates()
24692469 $ rows = $ this ->adapter ->fetchAll ('SELECT * FROM table1 ' );
24702470 $ this ->assertEquals ('foo ' , $ rows [0 ]['name ' ]);
24712471 $ this ->assertEquals ('bar ' , $ rows [1 ]['name ' ]);
2472- $ this ->assertMatchesRegularExpression (' /[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}/ ' , $ rows [0 ]['created ' ]);
2473- $ this ->assertMatchesRegularExpression (' /[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}/ ' , $ rows [1 ]['created ' ]);
2472+ $ this ->assertMatchesRegularExpression ($ data [ 0 ][ ' created ' ]-> toDateTimeString () , $ rows [0 ]['created ' ]);
2473+ $ this ->assertMatchesRegularExpression ($ data [ 1 ][ ' created ' ]-> toDateTimeString () , $ rows [1 ]['created ' ]);
24742474 }
24752475
24762476 public function testInsertData ()
Original file line number Diff line number Diff line change @@ -1923,8 +1923,8 @@ public function testBulkInsertDates()
19231923 $ rows = $ this ->adapter ->fetchAll ('SELECT * FROM table1 ' );
19241924 $ this ->assertEquals ('foo ' , $ rows [0 ]['name ' ]);
19251925 $ this ->assertEquals ('bar ' , $ rows [1 ]['name ' ]);
1926- $ this ->assertMatchesRegularExpression (' /[0-9]{4}-[0-9]{2}-[0-9]{2}/ ' , $ rows [0 ]['created ' ]);
1927- $ this ->assertMatchesRegularExpression (' /[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}/ ' , $ rows [1 ]['created ' ]);
1926+ $ this ->assertMatchesRegularExpression ($ data [ 0 ][ ' created ' ]-> toDateString () , $ rows [0 ]['created ' ]);
1927+ $ this ->assertMatchesRegularExpression ($ data [ 1 ][ ' created ' ]-> toDateTimeString () , $ rows [1 ]['created ' ]);
19281928 }
19291929
19301930 public function testNullWithoutDefaultValue ()
Original file line number Diff line number Diff line change @@ -1367,8 +1367,8 @@ public function testBulkInsertDates()
13671367 $ rows = $ this ->adapter ->fetchAll ('SELECT * FROM table1 ' );
13681368 $ this ->assertEquals ('foo ' , $ rows [0 ]['name ' ]);
13691369 $ this ->assertEquals ('bar ' , $ rows [1 ]['name ' ]);
1370- $ this ->assertMatchesRegularExpression (' /[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}/ ' , $ rows [0 ]['created ' ]);
1371- $ this ->assertMatchesRegularExpression (' /[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}/ ' , $ rows [1 ]['created ' ]);
1370+ $ this ->assertMatchesRegularExpression ($ data [ 0 ][ ' created ' ]-> toDateTimeString () , $ rows [0 ]['created ' ]);
1371+ $ this ->assertMatchesRegularExpression ($ data [ 1 ][ ' created ' ]-> toDateTimeString () , $ rows [1 ]['created ' ]);
13721372 }
13731373
13741374 public function testInsertData ()
You can’t perform that action at this time.
0 commit comments