Changeset 38408 for trunk/tests/phpunit/tests/media.php
- Timestamp:
- 08/27/2016 05:24:58 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/media.php
r38398 r38408 1797 1797 return $data; 1798 1798 } 1799 1800 /** 1801 * @ticket 37813 1802 */ 1803 public function test_return_type_when_inserting_attachment_with_error_in_data() { 1804 $data = array( 1805 'post_status' => 'public', 1806 'post_content' => 'Attachment content', 1807 'post_title' => 'Attachment Title', 1808 'post_date' => '2012-02-30 00:00:00', 1809 ); 1810 1811 $attachment_id = wp_insert_attachment( $data, '', 0, true ); 1812 $this->assertWPError( $attachment_id ); 1813 $this->assertEquals( 'invalid_date', $attachment_id->get_error_code() ); 1814 1815 $attachment_id = wp_insert_attachment( $data, '', 0 ); 1816 $this->assertSame( 0, $attachment_id ); 1817 } 1799 1818 } 1800 1819
Note: See TracChangeset
for help on using the changeset viewer.