| 246 | |
| 247 | /** |
| 248 | * @ticket 18210 |
| 249 | */ |
| 250 | function test_case_insensitive_collation_inconsistencies() { |
| 251 | $this->assertInternalType( 'integer', add_post_meta( $this->post_id, 'ALLDAY', 'value' ) ); |
| 252 | $this->assertInternalType( 'integer', add_post_meta( $this->post_id_2, 'ALLDAY', 'value' ) ); |
| 253 | |
| 254 | $this->assertTrue( update_post_meta( $this->post_id, 'allday', 'update using lowercase' ) ); |
| 255 | |
| 256 | $this->assertEquals( 'value', get_post_meta( $this->post_id, 'ALLDAY', true ) ); |
| 257 | $this->assertEquals( 'update using lowercase', get_post_meta( $this->post_id, 'allday', true ) ); |
| 258 | |
| 259 | $posts = get_posts( 'meta_key=allday' ); |
| 260 | $this->assertEquals( 1, count( $posts ) ); |
| 261 | |
| 262 | $this->assertTrue( delete_post_meta( $this->post_id, 'allday' ) ); |
| 263 | $this->assertEquals( 'update using lowercase', get_post_meta( $this->post_id, 'ALLDAY', true ) ); |
| 264 | $this->assertEquals( '', get_post_meta( $this->post_id, 'allday', true ) ); |
| 265 | |
| 266 | |
| 267 | } |