- Timestamp:
- 08/20/2016 05:34:13 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/media/getAttachmentTaxonomies.php
r38291 r38292 80 80 $this->assertSame( $expected, $found ); 81 81 } 82 83 /** 84 * @ticket 37368 85 */ 86 public function test_should_respect_output_objects() { 87 register_taxonomy( 'wptests_tax2', 'attachment:image' ); 88 89 $a = self::factory()->attachment->create_object( 'image.jpg', 0, array( 90 'post_mime_type' => 'image/jpeg', 91 'post_type' => 'attachment' 92 ) ); 93 $attachment = get_post( $a ); 94 95 $found = get_attachment_taxonomies( $attachment, 'objects' ); 96 97 $this->assertSame( array( 'wptests_tax2' ), array_keys( $found ) ); 98 $this->assertInternalType( 'object', $found['wptests_tax2'] ); 99 $this->assertSame( 'wptests_tax2', $found['wptests_tax2']->name ); 100 } 82 101 }
Note: See TracChangeset
for help on using the changeset viewer.