Changeset 813 in tests for trunk/wp-testcase/test_post_filtering.php
- Timestamp:
- 06/30/2012 09:01:24 PM (14 years ago)
- File:
-
- 1 edited
-
trunk/wp-testcase/test_post_filtering.php (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-testcase/test_post_filtering.php
r658 r813 4 4 // these tests don't care what code is responsible for filtering or how it is called, just that it happens when a post is saved. 5 5 6 7 class TestPostFiltering extends WPTestCase { 6 /** 7 * @group posts 8 */ 9 class TestPostFiltering extends WP_UnitTestCase { 8 10 function setUp() { 9 11 parent::setUp(); … … 14 16 15 17 function tearDown() { 18 kses_remove_filters(); 16 19 parent::tearDown(); 17 kses_remove_filters();18 }19 20 function _insert_quick_post($title, $content, $more=array()) {21 return $this->post_ids[] = wp_insert_post(array_merge(array(22 'post_author' => $this->author->ID,23 'post_status' => 'publish',24 'post_title' => $title,25 'post_content' => $content,26 ), $more));27 20 } 28 21 … … 38 31 EOF; 39 32 40 $id = $this-> _insert_quick_post(__FUNCTION__, $content);33 $id = $this->factory->post->create( array( 'post_content' => $content ) ); 41 34 $post = get_post($id); 42 35 … … 55 48 EOF; 56 49 57 $id = $this-> _insert_quick_post(__FUNCTION__, $content);50 $id = $this->factory->post->create( array( 'post_content' => $content ) ); 58 51 $post = get_post($id); 59 52 … … 72 65 EOF; 73 66 74 $id = $this-> _insert_quick_post(__FUNCTION__, $content);67 $id = $this->factory->post->create( array( 'post_content' => $content ) ); 75 68 $post = get_post($id); 76 69 … … 90 83 EOF; 91 84 92 $id = $this-> _insert_quick_post(__FUNCTION__, $content);85 $id = $this->factory->post->create( array( 'post_content' => $content ) ); 93 86 $post = get_post($id); 94 87 … … 110 103 EOF; 111 104 112 $id = $this-> _insert_quick_post(__FUNCTION__, $content);105 $id = $this->factory->post->create( array( 'post_content' => $content ) ); 113 106 $post = get_post($id); 114 107 … … 130 123 EOF; 131 124 132 $id = $this-> _insert_quick_post(__FUNCTION__, $content);125 $id = $this->factory->post->create( array( 'post_content' => $content ) ); 133 126 $post = get_post($id); 134 127 … … 158 151 EOF; 159 152 160 $id = $this-> _insert_quick_post(__FUNCTION__, $content);153 $id = $this->factory->post->create( array( 'post_content' => $content ) ); 161 154 $post = get_post($id); 162 155 … … 186 179 EOF; 187 180 188 $id = $this-> _insert_quick_post(__FUNCTION__, $content);181 $id = $this->factory->post->create( array( 'post_content' => $content ) ); 189 182 $post = get_post($id); 190 183 … … 206 199 EOF; 207 200 208 $id = $this-> _insert_quick_post(__FUNCTION__, $content);201 $id = $this->factory->post->create( array( 'post_content' => $content ) ); 209 202 $post = get_post($id); 210 203
Note: See TracChangeset
for help on using the changeset viewer.