Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 6 additions & 9 deletions src/Codeception/Module/REST.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
* * shortDebugResponse *optional* - amount of chars to limit the api response length
*
* This module requires PHPBrowser or any of Framework modules enabled.
*
*
* In case you need to configure low-level HTTP fields, that's done on the PHPBrowser level.
* Check the example below for details.
*
Expand Down Expand Up @@ -358,12 +358,9 @@ public function amNTLMAuthenticated($username, $password)
if ($this->isFunctional) {
throw new ModuleException(__METHOD__, 'Not supported by functional modules');
}
if (!defined('\GuzzleHttp\Client::VERSION')) {
if (!defined('\GuzzleHttp\Client::MAJOR_VERSION') && !defined('\GuzzleHttp\Client::VERSION')) {
throw new ModuleException(__METHOD__, 'Not supported if not using a Guzzle client');
}
if (version_compare(\GuzzleHttp\Client::VERSION, '6.2.1', 'lt')) {
throw new ModuleException(__METHOD__, 'Guzzle ' . \GuzzleHttp\Client::VERSION . ' found. Requires Guzzle >=6.3.0 for NTLM auth option');
}
$this->client->setAuth($username, $password, 'ntlm');
}

Expand Down Expand Up @@ -1602,11 +1599,11 @@ public function startFollowingRedirects()
{
$this->client->followRedirects(true);
}

/**
* Sets SERVER parameters valid for all next requests.
* this will remove old ones.
*
*
* ```php
* $I->setServerParameters([]);
* ```
Expand All @@ -1615,10 +1612,10 @@ public function setServerParameters(array $params)
{
$this->client->setServerParameters($params);
}

/**
* Sets SERVER parameter valid for all next requests.
*
*
* ```php
* $I->haveServerParameter('name', 'value');
* ```
Expand Down