Changeset 52010 for trunk/tests/phpunit/tests/user/author.php
- Timestamp:
- 11/04/2021 03:22:47 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/user/author.php
r51568 r52010 34 34 } 35 35 36 function set_up() {36 public function set_up() { 37 37 parent::set_up(); 38 38 … … 40 40 } 41 41 42 function test_get_the_author() {42 public function test_get_the_author() { 43 43 $author_name = get_the_author(); 44 44 $user = new WP_User( self::$author_id ); … … 48 48 } 49 49 50 function test_get_the_author_meta() {50 public function test_get_the_author_meta() { 51 51 $this->assertSame( 'test_author', get_the_author_meta( 'login' ) ); 52 52 $this->assertSame( 'test_author', get_the_author_meta( 'user_login' ) ); … … 69 69 } 70 70 71 function test_get_the_author_meta_no_authordata() {71 public function test_get_the_author_meta_no_authordata() { 72 72 unset( $GLOBALS['authordata'] ); 73 73 $this->assertSame( '', get_the_author_meta( 'id' ) ); … … 76 76 } 77 77 78 function test_get_the_author_posts() {78 public function test_get_the_author_posts() { 79 79 // Test with no global post, result should be 0 because no author is found. 80 80 $this->assertSame( 0, get_the_author_posts() ); … … 86 86 * @ticket 30904 87 87 */ 88 function test_get_the_author_posts_with_custom_post_type() {88 public function test_get_the_author_posts_with_custom_post_type() { 89 89 register_post_type( 'wptests_pt' ); 90 90
Note: See TracChangeset
for help on using the changeset viewer.