@@ 213-231 (lines=19) @@ | ||
210 | /** |
|
211 | * Test WP_Fields_API::remove_form() |
|
212 | */ |
|
213 | public function test_remove_form_by_object_type() { |
|
214 | ||
215 | /** |
|
216 | * @var $wp_fields WP_Fields_API |
|
217 | */ |
|
218 | global $wp_fields; |
|
219 | ||
220 | // Add a form |
|
221 | $this->test_add_form( $this->object_type, $this->object_name ); |
|
222 | ||
223 | // Remove form |
|
224 | $wp_fields->remove_form( $this->object_type, null, true ); |
|
225 | ||
226 | // Form no longer exists for this object type / name |
|
227 | $form = $wp_fields->get_form( $this->object_type, 'my_test_form', $this->object_name ); |
|
228 | ||
229 | $this->assertEmpty( $form ); |
|
230 | ||
231 | } |
|
232 | ||
233 | /** |
|
234 | * Test WP_Fields_API::remove_form() |
|
@@ 259-277 (lines=19) @@ | ||
256 | /** |
|
257 | * Test WP_Fields_API::remove_form() |
|
258 | */ |
|
259 | public function test_remove_form_by_object_name() { |
|
260 | ||
261 | /** |
|
262 | * @var $wp_fields WP_Fields_API |
|
263 | */ |
|
264 | global $wp_fields; |
|
265 | ||
266 | // Add a form |
|
267 | $this->test_add_form( $this->object_type, $this->object_name ); |
|
268 | ||
269 | // Remove form |
|
270 | $wp_fields->remove_form( $this->object_type, true, $this->object_name ); |
|
271 | ||
272 | // Form no longer exists for this object type / name |
|
273 | $form = $wp_fields->get_form( $this->object_type, 'my_test_form', $this->object_name ); |
|
274 | ||
275 | $this->assertEmpty( $form ); |
|
276 | ||
277 | } |
|
278 | ||
279 | /** |
|
280 | * Test WP_Fields_API::add_section() |