Changeset 35225 for trunk/tests/phpunit/tests/post/formats.php
- Timestamp:
- 10/16/2015 09:04:12 PM (11 years ago)
- File:
-
- 1 edited
-
trunk/tests/phpunit/tests/post/formats.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/post/formats.php
r25002 r35225 10 10 11 11 function test_set_get_post_format_for_post() { 12 $post_id = $this->factory->post->create();12 $post_id = self::$factory->post->create(); 13 13 14 14 $format = get_post_format( $post_id ); … … 38 38 */ 39 39 function test_set_get_post_format_for_page() { 40 $post_id = $this->factory->post->create( array( 'post_type' => 'page' ) );40 $post_id = self::$factory->post->create( array( 'post_type' => 'page' ) ); 41 41 42 42 $format = get_post_format( $post_id ); … … 70 70 71 71 function test_has_format() { 72 $post_id = $this->factory->post->create();72 $post_id = self::$factory->post->create(); 73 73 74 74 $this->assertFalse( has_post_format( 'standard', $post_id ) ); … … 112 112 $commentary 113 113 DATA; 114 $link_post_id = $this->factory->post->create( array( 'post_content' => $link ) );114 $link_post_id = self::$factory->post->create( array( 'post_content' => $link ) ); 115 115 $content_link = get_url_in_content( get_post_field( 'post_content', $link_post_id ) ); 116 116 $this->assertEquals( false, $content_link ); 117 117 118 $link_with_post_id = $this->factory->post->create( array( 'post_content' => $link_with_commentary ) );118 $link_with_post_id = self::$factory->post->create( array( 'post_content' => $link_with_commentary ) ); 119 119 $content_link = get_url_in_content( get_post_field( 'post_content', $link_with_post_id ) ); 120 120 $this->assertEquals( false, $content_link ); … … 126 126 $this->assertEquals( false, $content_link ); 127 127 128 $empty_post_id = $this->factory->post->create( array( 'post_content' => '' ) );128 $empty_post_id = self::$factory->post->create( array( 'post_content' => '' ) ); 129 129 $content_link = get_url_in_content( get_post_field( 'post_content', $empty_post_id ) ); 130 130 $this->assertEquals( false, $content_link ); 131 131 132 $comm_post_id = $this->factory->post->create( array( 'post_content' => $commentary ) );132 $comm_post_id = self::$factory->post->create( array( 'post_content' => $commentary ) ); 133 133 $content_link = get_url_in_content( get_post_field( 'post_content', $comm_post_id ) ); 134 134 $this->assertEquals( false, $content_link ); 135 135 136 136 // Now with an href 137 $href_post_id = $this->factory->post->create( array( 'post_content' => $href ) );137 $href_post_id = self::$factory->post->create( array( 'post_content' => $href ) ); 138 138 $content_link = get_url_in_content( get_post_field( 'post_content', $href_post_id ) ); 139 139 $this->assertEquals( $link, $content_link ); 140 140 141 $href_with_post_id = $this->factory->post->create( array( 'post_content' => $href_with_commentary ) );141 $href_with_post_id = self::$factory->post->create( array( 'post_content' => $href_with_commentary ) ); 142 142 $content_link = get_url_in_content( get_post_field( 'post_content', $href_with_post_id ) ); 143 143 $this->assertEquals( $link, $content_link ); … … 149 149 $this->assertEquals( $link, $content_link ); 150 150 151 $empty_post_id = $this->factory->post->create( array( 'post_content' => '' ) );151 $empty_post_id = self::$factory->post->create( array( 'post_content' => '' ) ); 152 152 $content_link = get_url_in_content( get_post_field( 'post_content', $empty_post_id ) ); 153 153 $this->assertEquals( false, $content_link ); 154 154 155 $comm_post_id = $this->factory->post->create( array( 'post_content' => $commentary ) );155 $comm_post_id = self::$factory->post->create( array( 'post_content' => $commentary ) ); 156 156 $content_link = get_url_in_content( get_post_field( 'post_content', $comm_post_id ) ); 157 157 $this->assertEquals( false, $content_link );
Note: See TracChangeset
for help on using the changeset viewer.