Changeset 35225 for trunk/tests/phpunit/tests/comment/getCommentClass.php
- Timestamp:
- 10/16/2015 09:04:12 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/comment/getCommentClass.php
r34454 r35225 6 6 class Tests_Comment_GetCommentClass extends WP_UnitTestCase { 7 7 public function test_should_accept_comment_id() { 8 $post_id = $this->factory->post->create();9 $comment_id = $this->factory->comment->create( array( 'comment_post_ID' => $post_id ) );8 $post_id = self::$factory->post->create(); 9 $comment_id = self::$factory->comment->create( array( 'comment_post_ID' => $post_id ) ); 10 10 11 11 $classes = get_comment_class( '', $comment_id ); … … 14 14 15 15 public function test_should_accept_comment_object() { 16 $post_id = $this->factory->post->create();17 $comment = $this->factory->comment->create_and_get( array( 'comment_post_ID' => $post_id ) );16 $post_id = self::$factory->post->create(); 17 $comment = self::$factory->comment->create_and_get( array( 'comment_post_ID' => $post_id ) ); 18 18 19 19 $classes = get_comment_class( '', $comment ); … … 22 22 23 23 public function test_should_append_single_class() { 24 $post_id = $this->factory->post->create();25 $comment_id = $this->factory->comment->create( array( 'comment_post_ID' => $post_id ) );24 $post_id = self::$factory->post->create(); 25 $comment_id = self::$factory->comment->create( array( 'comment_post_ID' => $post_id ) ); 26 26 27 27 $classes = get_comment_class( 'foo', $comment_id ); … … 30 30 31 31 public function test_should_append_array_of_classes() { 32 $post_id = $this->factory->post->create();33 $comment_id = $this->factory->comment->create( array( 'comment_post_ID' => $post_id ) );32 $post_id = self::$factory->post->create(); 33 $comment_id = self::$factory->comment->create( array( 'comment_post_ID' => $post_id ) ); 34 34 35 35 $classes = get_comment_class( array( 'foo', 'bar' ), $comment_id );
Note: See TracChangeset
for help on using the changeset viewer.