- Timestamp:
- 08/17/2018 01:50:26 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/category/categoryDescription.php
r42368 r43571 8 8 public function test_success_query_by_id() { 9 9 $description = 'Foo'; 10 $c = self::factory()->category->create( array( 11 'description' => $description, 12 ) ); 10 $c = self::factory()->category->create( 11 array( 12 'description' => $description, 13 ) 14 ); 13 15 14 $found = category_description( $c );16 $found = category_description( $c ); 15 17 $expected = apply_filters( 'term_description', $description ); 16 18 … … 20 22 public function test_success_query_by_object() { 21 23 $description = 'Foo'; 22 $c = self::factory()->category->create( array( 23 'description' => $description, 24 'slug' => 'bar', 25 ) ); 24 $c = self::factory()->category->create( 25 array( 26 'description' => $description, 27 'slug' => 'bar', 28 ) 29 ); 26 30 27 31 $category = get_term( $c ); 28 32 29 $found = category_description( $c );33 $found = category_description( $c ); 30 34 $expected = apply_filters( 'term_description', $description ); 31 35 … … 42 46 $description = 'Foo'; 43 47 44 $t = self::factory()->term->create( array( 45 'taxonomy' => 'wptests_tax', 46 'description' => $description, 47 ) ); 48 $t = self::factory()->term->create( 49 array( 50 'taxonomy' => 'wptests_tax', 51 'description' => $description, 52 ) 53 ); 48 54 49 55 $term = get_term( $t ); 50 56 51 $found = category_description( $t );57 $found = category_description( $t ); 52 58 $expected = apply_filters( 'term_description', $description ); 53 59 … … 64 70 $description = 'Foo'; 65 71 66 $t = self::factory()->term->create( array( 67 'taxonomy' => 'wptests_tax', 68 'description' => $description, 69 ) ); 72 $t = self::factory()->term->create( 73 array( 74 'taxonomy' => 'wptests_tax', 75 'description' => $description, 76 ) 77 ); 70 78 71 79 clean_term_cache( $t ); 72 80 73 $found = category_description( $t );81 $found = category_description( $t ); 74 82 $expected = apply_filters( 'term_description', $description ); 75 83
Note: See TracChangeset
for help on using the changeset viewer.