Changeset 42343 for trunk/tests/phpunit/tests/post/pings.php
- Timestamp:
- 11/30/2017 11:09:33 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/post/pings.php
r38852 r42343 8 8 9 9 public function test_returns_to_ping_sites_from_post_id() { 10 $post_id = self::factory()->post->create( array( 'to_ping' => 'http://www.example.com 11 http://www.otherexample.com' ) ); 10 $post_id = self::factory()->post->create( 11 array( 12 'to_ping' => 'http://www.example.com 13 http://www.otherexample.com', 14 ) 15 ); 12 16 $this->assertSame( array( 'http://www.example.com', 'http://www.otherexample.com' ), get_to_ping( $post_id ) ); 13 17 } 14 18 15 19 public function test_returns_to_ping_sites_from_post_object() { 16 $post_id = self::factory()->post->create( array( 'to_ping' => 'http://www.example.com 17 http://www.otherexample.com' ) ); 18 $post = get_post( $post_id ); 20 $post_id = self::factory()->post->create( 21 array( 22 'to_ping' => 'http://www.example.com 23 http://www.otherexample.com', 24 ) 25 ); 26 $post = get_post( $post_id ); 19 27 $this->assertSame( array( 'http://www.example.com', 'http://www.otherexample.com' ), get_to_ping( $post ) ); 20 28 } … … 27 35 public function test_returns_pinged_sites_from_post_object() { 28 36 $post_id = self::factory()->post->create( array( 'pinged' => 'foo bar baz' ) ); 29 $post = get_post( $post_id );37 $post = get_post( $post_id ); 30 38 $this->assertSame( array( 'foo', 'bar', 'baz' ), get_pung( $post ) ); 31 39 } … … 47 55 public function test_add_ping_with_post_object() { 48 56 $post_id = self::factory()->post->create(); 49 $post = get_post( $post_id );57 $post = get_post( $post_id ); 50 58 add_ping( $post, 'foo' ); 51 59 $this->assertSame( array( 'foo' ), get_pung( $post_id ) );
Note: See TracChangeset
for help on using the changeset viewer.