Changeset 42062 for branches/4.3/tests/phpunit/tests/date/query.php
- Timestamp:
- 10/31/2017 12:48:20 PM (8 years ago)
- Location:
- branches/4.3
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
tests/phpunit/tests/date/query.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/4.3
- Property svn:mergeinfo changed
/trunk merged: 41662,42056
- Property svn:mergeinfo changed
-
branches/4.3/tests/phpunit/tests/date/query.php
r31251 r42062 602 602 603 603 public function test_build_time_query_hour_minute() { 604 global $wpdb; 604 605 $q = new WP_Date_Query( array() ); 605 606 … … 608 609 // $compare value is floating point - use regex to account for 609 610 // varying precision on different PHP installations 610 $this->assertRegExp( "/DATE_FORMAT\( post_date, '%H\.%i' \) = 5\.150*/", $ found);611 $this->assertRegExp( "/DATE_FORMAT\( post_date, '%H\.%i' \) = 5\.150*/", $wpdb->remove_placeholder_escape( $found ) ); 611 612 } 612 613 613 614 public function test_build_time_query_hour_minute_second() { 615 global $wpdb; 614 616 $q = new WP_Date_Query( array() ); 615 617 … … 618 620 // $compare value is floating point - use regex to account for 619 621 // varying precision on different PHP installations 620 $this->assertRegExp( "/DATE_FORMAT\( post_date, '%H\.%i%s' \) = 5\.15350*/", $ found);622 $this->assertRegExp( "/DATE_FORMAT\( post_date, '%H\.%i%s' \) = 5\.15350*/", $wpdb->remove_placeholder_escape( $found ) ); 621 623 } 622 624 623 625 public function test_build_time_query_minute_second() { 626 global $wpdb; 624 627 $q = new WP_Date_Query( array() ); 625 628 … … 628 631 // $compare value is floating point - use regex to account for 629 632 // varying precision on different PHP installations 630 $this->assertRegExp( "/DATE_FORMAT\( post_date, '0\.%i%s' \) = 0\.15350*/", $ found);633 $this->assertRegExp( "/DATE_FORMAT\( post_date, '0\.%i%s' \) = 0\.15350*/", $wpdb->remove_placeholder_escape( $found ) ); 631 634 } 632 635
Note: See TracChangeset
for help on using the changeset viewer.