Ticket #27998: 27998-unit-tests.diff
| File 27998-unit-tests.diff, 687 bytes (added by , 12 years ago) |
|---|
-
tests/phpunit/tests/user/author.php
75 75 $this->assertEquals( '', get_the_author_meta( 'user_login' ) ); 76 76 $this->assertEquals( '', get_the_author_meta( 'does_not_exist' ) ); 77 77 } 78 } 79 No newline at end of file 78 79 function test_get_the_author_posts() { 80 // Test with no global post, result should be 0 because no author is found 81 $this->assertEquals( 0, get_the_author_posts() ); 82 $GLOBALS['post'] = $this->post_id; 83 $this->assertEquals( 1, get_the_author_posts() ); 84 } 85 }