Changeset 36329 for trunk/tests/phpunit/tests/post/output.php
- Timestamp:
- 01/16/2016 10:13:27 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/post/output.php
r36320 r36329 200 200 /** 201 201 * @ticket 27246 202 * @ticket 35486 202 203 */ 203 204 public function test_the_excerpt_password_protected_post() { 204 $GLOBALS['post'] = self::factory()->post->create_and_get( array( 'post_excerpt' => 'Post excerpt', 'post_password' => '1234' ) ); 205 $post = self::factory()->post->create_and_get( array( 'post_excerpt' => 'Post excerpt', 'post_password' => '1234' ) ); 206 $this->assertSame( 'There is no excerpt because this is a protected post.', get_the_excerpt( $post ) ); 207 208 $GLOBALS['post'] = $post; 205 209 $this->assertSame( "<p>There is no excerpt because this is a protected post.</p>\n", get_echo( 'the_excerpt' ) ); 206 $this->assertSame( 'There is no excerpt because this is a protected post.', get_the_excerpt() );207 210 } 208 211
Note: See TracChangeset
for help on using the changeset viewer.