- Timestamp:
- 11/30/2017 11:09:33 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/taxonomy/getObjectTaxonomies.php
r38292 r42343 11 11 12 12 public function test_object_should_accept_string() { 13 $found = get_object_taxonomies( 'wptests_pt' );13 $found = get_object_taxonomies( 'wptests_pt' ); 14 14 $expected = array( 'wptests_tax' ); 15 15 … … 18 18 19 19 public function test_object_should_accept_array_of_post_type_names() { 20 $found = get_object_taxonomies( array( 'wptests_pt' ) );20 $found = get_object_taxonomies( array( 'wptests_pt' ) ); 21 21 $expected = array( 'wptests_tax' ); 22 22 … … 25 25 26 26 public function test_object_should_accept_post_object() { 27 $p = self::factory()->post->create_and_get( array( 'post_type' => 'wptests_pt' ) );28 $found = get_object_taxonomies( $p );27 $p = self::factory()->post->create_and_get( array( 'post_type' => 'wptests_pt' ) ); 28 $found = get_object_taxonomies( $p ); 29 29 $expected = array( 'wptests_tax' ); 30 30 … … 41 41 42 42 public function test_any_value_of_output_other_than_names_should_return_objects() { 43 $found = get_object_taxonomies( 'wptests_pt', 'foo' );43 $found = get_object_taxonomies( 'wptests_pt', 'foo' ); 44 44 $expected = get_object_taxonomies( 'wptests_pt', 'objects' ); 45 45 … … 53 53 register_taxonomy( 'wptests_tax2', 'attachment:image' ); 54 54 55 $a = self::factory()->attachment->create_object( 'image.jpg', 0, array( 56 'post_mime_type' => 'image/jpeg', 57 'post_type' => 'attachment' 58 ) ); 55 $a = self::factory()->attachment->create_object( 56 'image.jpg', 0, array( 57 'post_mime_type' => 'image/jpeg', 58 'post_type' => 'attachment', 59 ) 60 ); 59 61 $attachment = get_post( $a ); 60 62 … … 70 72 register_taxonomy( 'wptests_tax2', 'attachment:image' ); 71 73 72 $a = self::factory()->attachment->create_object( 'image.jpg', 0, array( 73 'post_mime_type' => 'image/jpeg', 74 'post_type' => 'attachment' 75 ) ); 74 $a = self::factory()->attachment->create_object( 75 'image.jpg', 0, array( 76 'post_mime_type' => 'image/jpeg', 77 'post_type' => 'attachment', 78 ) 79 ); 76 80 $attachment = get_post( $a ); 77 81
Note: See TracChangeset
for help on using the changeset viewer.