Changeset 37594 for trunk/tests/phpunit/tests/meta/query.php
- Timestamp:
- 05/30/2016 04:35:16 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/meta/query.php
r32713 r37594 494 494 $sql = $query->get_sql( 'post', $wpdb->posts, 'ID', $this ); 495 495 496 $this->assertEquals( 1, substr_count( $sql['where'], " CAST($wpdb->postmeta.meta_value AS CHAR)= ''" ) );496 $this->assertEquals( 1, substr_count( $sql['where'], "$wpdb->postmeta.meta_value = ''" ) ); 497 497 } 498 498 … … 602 602 $sql = $query->get_sql( 'post', $wpdb->posts, 'ID', $this ); 603 603 604 $this->assertSame( 1, substr_count( $sql['where'], " CAST($wpdb->postmeta.meta_value AS CHAR)= ''" ) );604 $this->assertSame( 1, substr_count( $sql['where'], "$wpdb->postmeta.meta_value = ''" ) ); 605 605 } 606 606 … … 633 633 $sql = $query->get_sql( 'post', $wpdb->posts, 'ID', $this ); 634 634 635 $this->assertSame( 1, substr_count( $sql['where'], " CAST($wpdb->postmeta.meta_value AS CHAR)IN" ) );635 $this->assertSame( 1, substr_count( $sql['where'], "$wpdb->postmeta.meta_value IN" ) ); 636 636 } 637 637 … … 648 648 $sql = $query->get_sql( 'post', $wpdb->posts, 'ID', $this ); 649 649 650 $this->assertSame( 1, substr_count( $sql['where'], " CAST($wpdb->postmeta.meta_value AS CHAR)=" ) );650 $this->assertSame( 1, substr_count( $sql['where'], "$wpdb->postmeta.meta_value =" ) ); 651 651 } 652 652 … … 664 664 $sql = $query->get_sql( 'post', $wpdb->posts, 'ID', $this ); 665 665 666 $this->assertSame( 1, substr_count( $sql['where'], " CAST($wpdb->postmeta.meta_value AS CHAR)=" ) );666 $this->assertSame( 1, substr_count( $sql['where'], "$wpdb->postmeta.meta_value =" ) ); 667 667 } 668 668 … … 761 761 $sql = $query->get_sql( 'post', $wpdb->posts, 'ID', $this ); 762 762 763 $this->assertSame( 1, substr_count( $sql['where'], " CAST($wpdb->postmeta.meta_value AS CHAR)= 'bar'" ) );763 $this->assertSame( 1, substr_count( $sql['where'], "$wpdb->postmeta.meta_value = 'bar'" ) ); 764 764 } 765 765
Note: See TracChangeset
for help on using the changeset viewer.