Changeset 42343 for trunk/tests/phpunit/tests/comment/wpAllowComment.php
- Timestamp:
- 11/30/2017 11:09:33 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/comment/wpAllowComment.php
r38835 r42343 11 11 parent::setUp(); 12 12 13 self::$post_id = self::factory()->post->create(); 14 self::$comment_id = self::factory()->comment->create( array( 15 'comment_post_ID' => self::$post_id, 16 'comment_approved' => '1', 17 'comment_author' => 'Bob', 18 'comment_author_email' => 'bobthebuilder@example.com', 19 'comment_author_url' => 'http://example.com', 20 'comment_content' => 'Yes, we can!', 21 ) ); 13 self::$post_id = self::factory()->post->create(); 14 self::$comment_id = self::factory()->comment->create( 15 array( 16 'comment_post_ID' => self::$post_id, 17 'comment_approved' => '1', 18 'comment_author' => 'Bob', 19 'comment_author_email' => 'bobthebuilder@example.com', 20 'comment_author_url' => 'http://example.com', 21 'comment_content' => 'Yes, we can!', 22 ) 23 ); 22 24 23 25 update_option( 'comment_whitelist', 0 ); … … 32 34 33 35 public function test_allow_comment_if_comment_author_emails_differ() { 34 $now = time();36 $now = time(); 35 37 $comment_data = array( 36 'comment_post_ID' => self::$post_id,37 'comment_author' => 'Bob',38 'comment_post_ID' => self::$post_id, 39 'comment_author' => 'Bob', 38 40 'comment_author_email' => 'sideshowbob@example.com', 39 'comment_author_url' => 'http://example.com',40 'comment_content' => 'Yes, we can!',41 'comment_author_IP' => '192.168.0.1',42 'comment_parent' => 0,43 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now ),44 'comment_agent' => 'Bobbot/2.1',45 'comment_type' => '',41 'comment_author_url' => 'http://example.com', 42 'comment_content' => 'Yes, we can!', 43 'comment_author_IP' => '192.168.0.1', 44 'comment_parent' => 0, 45 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now ), 46 'comment_agent' => 'Bobbot/2.1', 47 'comment_type' => '', 46 48 ); 47 49 … … 55 57 */ 56 58 public function test_die_as_duplicate_if_comment_author_name_and_emails_match() { 57 $now = time();59 $now = time(); 58 60 $comment_data = array( 59 'comment_post_ID' => self::$post_id,60 'comment_author' => 'Bob',61 'comment_post_ID' => self::$post_id, 62 'comment_author' => 'Bob', 61 63 'comment_author_email' => 'bobthebuilder@example.com', 62 'comment_author_url' => 'http://example.com',63 'comment_content' => 'Yes, we can!',64 'comment_author_IP' => '192.168.0.1',65 'comment_parent' => 0,66 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now ),67 'comment_agent' => 'Bobbot/2.1',68 'comment_type' => '',64 'comment_author_url' => 'http://example.com', 65 'comment_content' => 'Yes, we can!', 66 'comment_author_IP' => '192.168.0.1', 67 'comment_parent' => 0, 68 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now ), 69 'comment_agent' => 'Bobbot/2.1', 70 'comment_type' => '', 69 71 ); 70 72
Note: See TracChangeset
for help on using the changeset viewer.