Skip to content

Commit a50e061

Browse files
Tests: Rename the admin/includesComment.php test file to match the new pattern.
This aims to make the test suite directory and file structure more intuitive for new contributors to work with, as well as follow the PHPUnit recommended test class name pattern with having `Test` as the end of the class name. Follow-up to [34456]. Props poena. See #53010. git-svn-id: https://develop.svn.wordpress.org/trunk@62328 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 7407804 commit a50e061

1 file changed

Lines changed: 4 additions & 11 deletions

File tree

tests/phpunit/tests/admin/includesComment.php renamed to tests/phpunit/tests/admin/Admin_Includes_Comment_CommentExists_Test.php

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,11 @@
33
/**
44
* @group admin
55
* @group comment
6+
*
7+
* @covers ::comment_exists
68
*/
7-
class Tests_Admin_IncludesComment extends WP_UnitTestCase {
9+
class Admin_Includes_Comment_CommentExists_Test extends WP_UnitTestCase {
10+
811
/**
912
* Post ID to add comments to.
1013
*
@@ -47,8 +50,6 @@ public static function wpSetUpBeforeClass( WP_UnitTest_Factory $factory ) {
4750

4851
/**
4952
* Verify that both the comment date and author must match for a comment to exist.
50-
*
51-
* @covers ::comment_exists
5253
*/
5354
public function test_must_match_date_and_author() {
5455
$this->assertNull( comment_exists( 1, '2004-01-02 12:00:00' ) );
@@ -57,35 +58,27 @@ public function test_must_match_date_and_author() {
5758

5859
/**
5960
* @ticket 33871
60-
*
61-
* @covers ::comment_exists
6261
*/
6362
public function test_default_value_of_timezone_should_be_blog() {
6463
$this->assertSame( (string) self::$post_id, comment_exists( 1, '2014-05-06 12:00:00' ) );
6564
}
6665

6766
/**
6867
* @ticket 33871
69-
*
70-
* @covers ::comment_exists
7168
*/
7269
public function test_should_respect_timezone_blog() {
7370
$this->assertSame( (string) self::$post_id, comment_exists( 1, '2014-05-06 12:00:00', 'blog' ) );
7471
}
7572

7673
/**
7774
* @ticket 33871
78-
*
79-
* @covers ::comment_exists
8075
*/
8176
public function test_should_respect_timezone_gmt() {
8277
$this->assertSame( (string) self::$post_id, comment_exists( 1, '2014-05-06 07:00:00', 'gmt' ) );
8378
}
8479

8580
/**
8681
* @ticket 33871
87-
*
88-
* @covers ::comment_exists
8982
*/
9083
public function test_invalid_timezone_should_fall_back_on_blog() {
9184
$this->assertSame( (string) self::$post_id, comment_exists( 1, '2014-05-06 12:00:00', 'not_a_valid_value' ) );

0 commit comments

Comments
 (0)