Changeset 922 in tests for trunk/tests/term.php
- Timestamp:
- 07/19/2012 04:31:22 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/term.php
r909 r922 24 24 25 25 $t = wp_insert_term( $term, $this->taxonomy ); 26 $this->assert True( is_array($t));26 $this->assertInternalType( 'array', $t ); 27 27 $this->assertFalse( is_wp_error($t) ); 28 28 $this->assertTrue( $t['term_id'] > 0 ); … … 45 45 $term = rand_str(); 46 46 $t = wp_insert_term( $term, $this->taxonomy ); 47 47 $this->assertInternalType( 'array', $t ); 48 48 $this->assertEquals( $t['term_id'], term_exists($t['term_id']) ); 49 49 $this->assertEquals( $t['term_id'], term_exists($term) ); … … 67 67 $term = rand_str(); 68 68 $t = wp_insert_term( $term, $this->taxonomy ); 69 69 $this->assertInternalType( 'array', $t ); 70 70 $term_obj = get_term_by('name', $term, $this->taxonomy); 71 71 $this->assertEquals( $t['term_id'], term_exists($term_obj->slug) ); … … 82 82 $term = rand_str(); 83 83 $result = wp_insert_term( $term, $this->taxonomy ); 84 $this->assertInternalType( 'array', $result ); 84 85 $term_id[$term] = $result['term_id']; 85 86 } … … 175 176 $term = rand_str(); 176 177 $result = wp_insert_term( $term, $this->taxonomy ); 178 $this->assertInternalType( 'array', $result ); 177 179 $terms_1[$i] = $result['term_id']; 178 180 } … … 236 238 237 239 $t = wp_insert_term( $term, 'category' ); 240 $this->assertInternalType( 'array', $t ); 238 241 $t2 = wp_insert_term( $term, 'category', array( 'parent' => $t['term_id'] ) ); 242 $this->assertInternalType( 'array', $t2 ); 239 243 if ( function_exists( 'term_is_ancestor_of' ) ) { 240 244 $this->assertTrue( term_is_ancestor_of( $t['term_id'], $t2['term_id'], 'category' ) ); … … 274 278 // set up test data 275 279 $a = wp_insert_term( 'parent', $this->taxonomy ); 280 $this->assertInternalType( 'array', $a ); 276 281 $b = wp_insert_term( 'child', $this->taxonomy, array( 'parent' => $a['term_id'] ) ); 282 $this->assertInternalType( 'array', $b ); 277 283 $c = wp_insert_term( 'neighbor', $this->taxonomy ); 284 $this->assertInternalType( 'array', $c ); 278 285 $d = wp_insert_term( 'pet', $this->taxonomy, array( 'parent' => $c['term_id'] ) ); 286 $this->assertInternalType( 'array', $c ); 279 287 280 288 $a_term = get_term( $a['term_id'], $this->taxonomy );
Note: See TracChangeset
for help on using the changeset viewer.