Changeset 35242 for trunk/tests/phpunit/tests/term/getTerm.php
- Timestamp:
- 10/17/2015 06:02:16 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/term/getTerm.php
r35227 r35242 25 25 global $wpdb; 26 26 27 $term = self:: $factory->term->create_and_get( array( 'taxonomy' => 'wptests_tax' ) );27 $term = self::factory()->term->create_and_get( array( 'taxonomy' => 'wptests_tax' ) ); 28 28 clean_term_cache( $term->term_id, 'wptests_tax' ); 29 29 … … 47 47 global $wpdb; 48 48 49 $t = self:: $factory->term->create( array( 'taxonomy' => 'wptests_tax' ) );49 $t = self::factory()->term->create( array( 'taxonomy' => 'wptests_tax' ) ); 50 50 clean_term_cache( $t, 'wptests_tax' ); 51 51 … … 61 61 62 62 public function test_output_object() { 63 $t = self:: $factory->term->create( array( 'taxonomy' => 'wptests_tax' ) );63 $t = self::factory()->term->create( array( 'taxonomy' => 'wptests_tax' ) ); 64 64 $this->assertInternalType( 'object', get_term( $t, 'wptests_tax', OBJECT ) ); 65 65 } 66 66 67 67 public function test_output_array_a() { 68 $t = self:: $factory->term->create( array( 'taxonomy' => 'wptests_tax' ) );68 $t = self::factory()->term->create( array( 'taxonomy' => 'wptests_tax' ) ); 69 69 $term = get_term( $t, 'wptests_tax', ARRAY_A ); 70 70 $this->assertInternalType( 'array', $term ); … … 73 73 74 74 public function test_output_array_n() { 75 $t = self:: $factory->term->create( array( 'taxonomy' => 'wptests_tax' ) );75 $t = self::factory()->term->create( array( 'taxonomy' => 'wptests_tax' ) ); 76 76 $term = get_term( $t, 'wptests_tax', ARRAY_N ); 77 77 $this->assertInternalType( 'array', $term ); … … 83 83 84 84 public function test_output_should_fall_back_to_object_for_invalid_input() { 85 $t = self:: $factory->term->create( array( 'taxonomy' => 'wptests_tax' ) );85 $t = self::factory()->term->create( array( 'taxonomy' => 'wptests_tax' ) ); 86 86 $this->assertInternalType( 'object', get_term( $t, 'wptests_tax', 'foo' ) ); 87 87 } … … 93 93 global $wpdb; 94 94 95 $t = self:: $factory->term->create( array( 'taxonomy' => 'wptests_tax' ) );95 $t = self::factory()->term->create( array( 'taxonomy' => 'wptests_tax' ) ); 96 96 97 97 // Get raw data from the database. … … 112 112 */ 113 113 public function test_should_return_null_when_provided_taxonomy_does_not_match_actual_term_taxonomy() { 114 $term_id = self:: $factory->term->create( array( 'taxonomy' => 'post_tag' ) );114 $term_id = self::factory()->term->create( array( 'taxonomy' => 'post_tag' ) ); 115 115 $this->assertNull( get_term( $term_id, 'category' ) ); 116 116 }
Note: See TracChangeset
for help on using the changeset viewer.