function UserResourceTestBase::userResourceTestBaseSkipTests

Same name in other branches
  1. 11.x core/modules/user/tests/src/Functional/Rest/UserResourceTestBase.php \Drupal\Tests\user\Functional\Rest\UserResourceTestBase::userResourceTestBaseSkipTests()

Marks some tests as skipped because XML cannot be deserialized.

@before

File

core/modules/user/tests/src/Functional/Rest/UserResourceTestBase.php, line 56

Class

UserResourceTestBase

Namespace

Drupal\Tests\user\Functional\Rest

Code

public function userResourceTestBaseSkipTests() : void {
    if (in_array($this->name(), [
        'testPatchDxForSecuritySensitiveBaseFields',
        'testPatchSecurityOtherUser',
    ], TRUE)) {
        if (static::$format === 'xml') {
            $this->markTestSkipped('Deserialization of the XML format is not supported.');
        }
        if (static::$auth === FALSE) {
            $this->markTestSkipped('The anonymous user is never allowed to modify itself.');
        }
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.