Skip to content

Commit

Permalink
Tests: Don't skip some Ajax tests on multisite, add them to the `ms-e…
Browse files Browse the repository at this point in the history
…xcluded` group instead.

Follow-up to [46693], [49835].

See #53363.

git-svn-id: https://develop.svn.wordpress.org/trunk@51870 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
SergeyBiryukov committed Sep 26, 2021
1 parent 364dfec commit e0359da
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
3 changes: 1 addition & 2 deletions tests/phpunit/tests/ajax/Attachments.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,9 @@ public function test_wp_ajax_send_attachment_to_editor_should_return_an_image()

/**
* @ticket 36578
* @group ms-excluded
*/
public function test_wp_ajax_send_attachment_to_editor_should_return_a_link() {
$this->skipWithMultisite();

// Become an administrator.
$post = $_POST;
$user_id = self::factory()->user->create(
Expand Down
4 changes: 3 additions & 1 deletion tests/phpunit/tests/ajax/DeletePlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,10 @@ public function test_invalid_file() {
$this->assertSameSets( $expected, $response );
}

/**
* @group ms-excluded
*/
public function test_delete_plugin() {
$this->skipWithMultisite();
$this->_setRole( 'administrator' );

$_POST['_ajax_nonce'] = wp_create_nonce( 'updates' );
Expand Down
8 changes: 6 additions & 2 deletions tests/phpunit/tests/ajax/ManageThemes.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,10 @@ public function test_missing_capability() {
$this->assertSameSets( $expected, $response );
}

/**
* @group ms-excluded
*/
public function test_update_theme() {
$this->skipWithMultisite();
$this->_setRole( 'administrator' );

$_POST['_ajax_nonce'] = wp_create_nonce( 'updates' );
Expand Down Expand Up @@ -139,8 +141,10 @@ public function test_update_theme() {
$this->assertSameSets( $expected, $response );
}

/**
* @group ms-excluded
*/
function test_uppercase_theme_slug() {
$this->skipWithMultisite();
$this->_setRole( 'administrator' );

$_POST['_ajax_nonce'] = wp_create_nonce( 'updates' );
Expand Down
4 changes: 3 additions & 1 deletion tests/phpunit/tests/ajax/UpdatePlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,10 @@ public function test_invalid_file() {
$this->assertSameSets( $expected, $response );
}

/**
* @group ms-excluded
*/
public function test_update_plugin() {
$this->skipWithMultisite();
$this->_setRole( 'administrator' );

$_POST['_ajax_nonce'] = wp_create_nonce( 'updates' );
Expand Down

0 comments on commit e0359da

Please sign in to comment.