function RESTTestBase::assertResponse

Overrides WebTestBase::assertResponse

File

core/modules/rest/src/Tests/RESTTestBase.php, line 250

Class

RESTTestBase
Test helper class that provides a REST client method to send HTTP requests.

Namespace

Drupal\rest\Tests

Code

protected function assertResponse($code, $message = '', $group = 'Browser') {
    if (!isset($this->response)) {
        return parent::assertResponse($code, $message, $group);
    }
    return $this->assertEqual($code, $this->response
        ->getStatusCode(), $message ? $message : "HTTP response expected {$code}, actual {$this->response->getStatusCode()}", $group);
}

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