Changeset 51331 for trunk/tests/phpunit/tests/term/getTerm.php
- Timestamp:
- 07/05/2021 05:21:53 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/term/getTerm.php
r50935 r51331 98 98 public function test_output_object() { 99 99 $t = self::factory()->term->create( array( 'taxonomy' => 'wptests_tax' ) ); 100 $this->assertI nternalType( 'object',get_term( $t, 'wptests_tax', OBJECT ) );100 $this->assertIsObject( get_term( $t, 'wptests_tax', OBJECT ) ); 101 101 } 102 102 … … 104 104 $t = self::factory()->term->create( array( 'taxonomy' => 'wptests_tax' ) ); 105 105 $term = get_term( $t, 'wptests_tax', ARRAY_A ); 106 $this->assertI nternalType( 'array',$term );106 $this->assertIsArray( $term ); 107 107 $this->assertTrue( isset( $term['term_id'] ) ); 108 108 } … … 111 111 $t = self::factory()->term->create( array( 'taxonomy' => 'wptests_tax' ) ); 112 112 $term = get_term( $t, 'wptests_tax', ARRAY_N ); 113 $this->assertI nternalType( 'array',$term );113 $this->assertIsArray( $term ); 114 114 $this->assertFalse( isset( $term['term_id'] ) ); 115 115 foreach ( $term as $k => $v ) { 116 $this->assertI nternalType( 'integer',$k );116 $this->assertIsInt( $k ); 117 117 } 118 118 } … … 120 120 public function test_output_should_fall_back_to_object_for_invalid_input() { 121 121 $t = self::factory()->term->create( array( 'taxonomy' => 'wptests_tax' ) ); 122 $this->assertI nternalType( 'object',get_term( $t, 'wptests_tax', 'foo' ) );122 $this->assertIsObject( get_term( $t, 'wptests_tax', 'foo' ) ); 123 123 } 124 124 … … 141 141 142 142 $this->assertInstanceOf( 'WP_Term', $found ); 143 $this->assertI nternalType( 'int',$found->term_id );144 $this->assertI nternalType( 'int',$found->term_taxonomy_id );145 $this->assertI nternalType( 'int',$found->parent );146 $this->assertI nternalType( 'int',$found->count );147 $this->assertI nternalType( 'int',$found->term_group );143 $this->assertIsInt( $found->term_id ); 144 $this->assertIsInt( $found->term_taxonomy_id ); 145 $this->assertIsInt( $found->parent ); 146 $this->assertIsInt( $found->count ); 147 $this->assertIsInt( $found->term_group ); 148 148 } 149 149 }
Note: See TracChangeset
for help on using the changeset viewer.