mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2025-10-16 12:05:38 +00:00
Tests: Use named data providers in some wp_insert_post() tests.
Follow-up to [42380], [49125], [53521], [53785], [53787], [53788]. See #55652. git-svn-id: https://develop.svn.wordpress.org/trunk@53789 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
5e2861c92d
commit
9f5935c2e8
@ -687,7 +687,7 @@ class Tests_Post_wpInsertPost extends WP_UnitTestCase {
|
||||
public function test_wp_insert_post_default_comment_ping_status_open() {
|
||||
$post_id = self::factory()->post->create(
|
||||
array(
|
||||
'post_status' => 'publish',
|
||||
'post_status' => 'publish',
|
||||
)
|
||||
);
|
||||
$post = get_post( $post_id );
|
||||
@ -702,8 +702,8 @@ class Tests_Post_wpInsertPost extends WP_UnitTestCase {
|
||||
public function test_wp_insert_post_page_default_comment_ping_status_closed() {
|
||||
$post_id = self::factory()->post->create(
|
||||
array(
|
||||
'post_status' => 'publish',
|
||||
'post_type' => 'page',
|
||||
'post_status' => 'publish',
|
||||
'post_type' => 'page',
|
||||
)
|
||||
);
|
||||
$post = get_post( $post_id );
|
||||
@ -1346,17 +1346,13 @@ class Tests_Post_wpInsertPost extends WP_UnitTestCase {
|
||||
* @return array Array of test arguments.
|
||||
*/
|
||||
public function data_various_post_types() {
|
||||
return array(
|
||||
array(
|
||||
'mapped_meta_caps',
|
||||
),
|
||||
array(
|
||||
'unmapped_meta_caps',
|
||||
),
|
||||
array(
|
||||
'post',
|
||||
),
|
||||
$post_types = array(
|
||||
'mapped_meta_caps',
|
||||
'unmapped_meta_caps',
|
||||
'post',
|
||||
);
|
||||
|
||||
return $this->text_array_to_dataprovider( $post_types );
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1365,20 +1361,14 @@ class Tests_Post_wpInsertPost extends WP_UnitTestCase {
|
||||
* @return array Array of test arguments.
|
||||
*/
|
||||
public function data_various_post_statuses() {
|
||||
return array(
|
||||
array(
|
||||
'draft',
|
||||
),
|
||||
array(
|
||||
'pending',
|
||||
),
|
||||
array(
|
||||
'private',
|
||||
),
|
||||
array(
|
||||
'publish',
|
||||
),
|
||||
$post_statuses = array(
|
||||
'draft',
|
||||
'pending',
|
||||
'private',
|
||||
'publish',
|
||||
);
|
||||
|
||||
return $this->text_array_to_dataprovider( $post_statuses );
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
Reference in New Issue
Block a user