Ticket #39265: query.php_fixed_test.patch
File query.php_fixed_test.patch, 1.6 KB (added by , 4 years ago) |
---|
-
date/query.php
222 222 223 223 $found = $q->get_compare( 224 224 array( 225 'compare' => ' BETWEEN',225 'compare' => 'NOT BETWEEN', 226 226 ) 227 227 ); 228 $this->assertSame( ' BETWEEN', $found );228 $this->assertSame( 'NOT BETWEEN', $found ); 229 229 } 230 230 231 231 public function test_validate_column_post_date() { … … 524 524 $found = $q->build_mysql_datetime( $datetime, $default_to_max ); 525 525 526 526 $message = "Expected {$expected}, got {$found}"; 527 $this->assertEquals ( strtotime( $expected ), strtotime( $found ), $message, 10);527 $this->assertEqualsWithDelta( strtotime( $expected ), strtotime( $found ), 10, $message ); 528 528 } 529 529 530 530 public function mysql_datetime_input_provider() { … … 559 559 $found = $q->build_mysql_datetime( $datetime, $default_to_max ); 560 560 561 561 $message = "Expected {$expected}, got {$found}"; 562 $this->assertEquals ( strtotime( $expected ), strtotime( $found ), $message, 10);562 $this->assertEqualsWithDelta( strtotime( $expected ), strtotime( $found ), 10, $message ); 563 563 564 564 } 565 565 … … 583 583 $found = $q->build_mysql_datetime( '-1 day' ); 584 584 585 585 $message = "Expected {$expected}, got {$found}"; 586 $this->assertEquals ( strtotime( $expected ), strtotime( $found ), $message, 10);586 $this->assertEqualsWithDelta( strtotime( $expected ), strtotime( $found ), 10, $message ); 587 587 } 588 588 589 589 public function test_build_time_query_insufficient_time_values() { … … 1133 1133 $columns[] = 'my_custom_column'; 1134 1134 return $columns; 1135 1135 } 1136 } 1136 } 1137 No newline at end of file