diff --git a/tests/phpunit/tests/meta/query.php b/tests/phpunit/tests/meta/query.php
index 6050676..972b4a6 100644
|
a
|
b
|
class Tests_Meta_Query extends WP_UnitTestCase { |
| 884 | 884 | |
| 885 | 885 | $this->assertTrue( $q->has_or_relation() ); |
| 886 | 886 | } |
| | 887 | |
| | 888 | /** |
| | 889 | * @ticket 42409 |
| | 890 | * @global type $wpdb |
| | 891 | */ |
| | 892 | |
| | 893 | public function test_compare_meta_key(){ |
| | 894 | global $wpdb; |
| | 895 | $meta_key='foo_bar'; |
| | 896 | $q=new WP_Meta_Query([array( |
| | 897 | 'compare_key'=>'LIKE', |
| | 898 | 'key'=>$meta_key |
| | 899 | )]); |
| | 900 | $sql=$q->get_sql('post', $wpdb->posts, 'ID', $this); |
| | 901 | |
| | 902 | $this->assertRegexp("/{$wpdb->postmeta}\.meta_key LIKE %{$wpdb->esc_like($meta_key)}%/", $sql['where']); |
| | 903 | |
| | 904 | } |
| | 905 | |
| 887 | 906 | } |