Changeset 42343 for trunk/tests/phpunit/tests/editor/wpEditors.php
- Timestamp:
- 11/30/2017 11:09:33 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/editor/wpEditors.php
r41346 r42343 10 10 class Tests_WP_Editors extends WP_UnitTestCase { 11 11 public function wp_link_query_callback( $results ) { 12 return array_merge( $results, array( 13 array( 14 'ID' => 123, 15 'title' => 'foo', 16 'permalink' => 'bar', 17 'info' => 'baz', 18 ), 19 ) ); 12 return array_merge( 13 $results, array( 14 array( 15 'ID' => 123, 16 'title' => 'foo', 17 'permalink' => 'bar', 18 'info' => 'baz', 19 ), 20 ) 21 ); 20 22 } 21 23 … … 30 32 $actual = _WP_Editors::wp_link_query( array( 's' => $post->post_title ) ); 31 33 32 $this->assertEqualSets( array(34 $this->assertEqualSets( 33 35 array( 34 'ID' => $post->ID, 35 'title' => $post->post_title, 36 'permalink' => get_permalink( $post->ID ), 37 'info' => mysql2date( __( 'Y/m/d' ), $post->post_date ), 38 ), 39 ), $actual ); 36 array( 37 'ID' => $post->ID, 38 'title' => $post->post_title, 39 'permalink' => get_permalink( $post->ID ), 40 'info' => mysql2date( __( 'Y/m/d' ), $post->post_date ), 41 ), 42 ), $actual 43 ); 40 44 } 41 45 … … 48 52 remove_filter( 'wp_link_query', array( $this, 'wp_link_query_callback' ) ); 49 53 50 $this->assertEqualSets( array(54 $this->assertEqualSets( 51 55 array( 52 'ID' => 123, 53 'title' => 'foo', 54 'permalink' => 'bar', 55 'info' => 'baz', 56 ), 57 ), $actual ); 56 array( 57 'ID' => 123, 58 'title' => 'foo', 59 'permalink' => 'bar', 60 'info' => 'baz', 61 ), 62 ), $actual 63 ); 58 64 } 59 65 … … 65 71 remove_filter( 'wp_link_query', array( $this, 'wp_link_query_callback' ) ); 66 72 67 $this->assertEqualSets( array(73 $this->assertEqualSets( 68 74 array( 69 'ID' => $post->ID, 70 'title' => $post->post_title, 71 'permalink' => get_permalink( $post->ID ), 72 'info' => mysql2date( __( 'Y/m/d' ), $post->post_date ), 73 ), 74 array( 75 'ID' => 123, 76 'title' => 'foo', 77 'permalink' => 'bar', 78 'info' => 'baz', 79 ), 80 ), $actual ); 75 array( 76 'ID' => $post->ID, 77 'title' => $post->post_title, 78 'permalink' => get_permalink( $post->ID ), 79 'info' => mysql2date( __( 'Y/m/d' ), $post->post_date ), 80 ), 81 array( 82 'ID' => 123, 83 'title' => 'foo', 84 'permalink' => 'bar', 85 'info' => 'baz', 86 ), 87 ), $actual 88 ); 81 89 } 82 90 }
Note: See TracChangeset
for help on using the changeset viewer.