protected function RESTTestBase::drupalLogin

Overrides WebTestBase::drupalLogin().

Overrides WebTestBase::drupalLogin

5 calls to RESTTestBase::drupalLogin()
CreateTest::testCreate in drupal/core/modules/rest/lib/Drupal/rest/Tests/CreateTest.php
Tests several valid and invalid create requests on all entity types.
DBLogTest::testWatchdog in drupal/core/modules/rest/lib/Drupal/rest/Tests/DBLogTest.php
Writes a log messages and retrieves it via the REST API.
DeleteTest::testDelete in drupal/core/modules/rest/lib/Drupal/rest/Tests/DeleteTest.php
Tests several valid and invalid delete requests on all entity types.
ReadTest::testRead in drupal/core/modules/rest/lib/Drupal/rest/Tests/ReadTest.php
Tests several valid and invalid read requests on all entity types.
UpdateTest::testPatchUpdate in drupal/core/modules/rest/lib/Drupal/rest/Tests/UpdateTest.php
Tests several valid and invalid partial update requests on test entities.

File

drupal/core/modules/rest/lib/Drupal/rest/Tests/RESTTestBase.php, line 235
Definition of Drupal\rest\test\RESTTestBase.

Class

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

Namespace

Drupal\rest\Tests

Code

protected function drupalLogin($user) {
  if (isset($this->curlHandle)) {

    // cURL quirk: when setting CURLOPT_CUSTOMREQUEST to anything other than
    // POST in httpRequest() it has to be restored to POST here. Otherwise the
    // POST request to login a user will not work.
    curl_setopt($this->curlHandle, CURLOPT_CUSTOMREQUEST, 'POST');
  }
  parent::drupalLogin($user);
}