- Timestamp:
- 01/09/2019 10:30:49 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/rest-api/rest-categories-controller.php
r43571 r44510 691 691 } 692 692 693 /** 694 * @ticket 39122 695 */ 693 696 public function test_get_item_meta() { 694 697 $request = new WP_REST_Request( 'GET', '/wp/v2/categories/1' ); … … 699 702 $meta = (array) $data['meta']; 700 703 $this->assertArrayHasKey( 'test_single', $meta ); 701 $this->assert Equals( $meta['test_single'], '' );704 $this->assertSame( $meta['test_single'], '' ); 702 705 $this->assertArrayHasKey( 'test_multi', $meta ); 703 $this->assert Equals( $meta['test_multi'], array() );706 $this->assertSame( $meta['test_multi'], array() ); 704 707 $this->assertArrayHasKey( 'test_cat_single', $meta ); 705 $this->assert Equals( $meta['test_cat_single'], '' );708 $this->assertSame( $meta['test_cat_single'], '' ); 706 709 $this->assertArrayHasKey( 'test_cat_multi', $meta ); 707 $this->assertEquals( $meta['test_cat_multi'], array() ); 708 } 709 710 $this->assertSame( $meta['test_cat_multi'], array() ); 711 } 712 713 /** 714 * @ticket 39122 715 */ 710 716 public function test_get_item_meta_registered_for_different_taxonomy() { 711 717 $request = new WP_REST_Request( 'GET', '/wp/v2/categories/1' ); … … 713 719 $data = $response->get_data(); 714 720 $this->assertArrayHasKey( 'meta', $data ); 715 $this->assertArrayHasKey( 'meta', $data );716 721 717 722 $meta = (array) $data['meta']; 718 $this->assert Equals( false,isset( $meta['test_tag_meta'] ) );723 $this->assertFalse( isset( $meta['test_tag_meta'] ) ); 719 724 } 720 725
Note: See TracChangeset
for help on using the changeset viewer.