Changeset 61369 for trunk/tests/phpunit/tests/comment.php
- Timestamp:
- 12/11/2025 01:53:26 AM (6 months ago)
- File:
-
- 1 edited
-
trunk/tests/phpunit/tests/comment.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/comment.php
r61248 r61369 1897 1897 $this->assertSame( '1', get_comment( $sibling_note )->comment_approved ); 1898 1898 } 1899 1900 /** 1901 * @ticket 61244 1902 * 1903 * @covers ::get_comment 1904 */ 1905 public function test_get_comment_filter() { 1906 $comment_id = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id ) ); 1907 1908 $comment = get_comment( $comment_id ); 1909 $this->assertInstanceOf( WP_Comment::class, $comment ); 1910 $this->assertSame( $comment_id, (int) $comment->comment_ID, 'Expected the same comment.' ); 1911 1912 add_filter( 'get_comment', '__return_null' ); 1913 $this->assertNull( get_comment( $comment_id ), 'Expected get_comment() to return null when get_comment filter returns null.' ); 1914 } 1899 1915 }
Note: See TracChangeset
for help on using the changeset viewer.