Skip to content

Commit 5ce678a

Browse files
author
Fabrizio Branca
committed
userName and userId were mixed up
1 parent 02d1d88 commit 5ce678a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/WebDriver/SauceLabs/SauceRest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class SauceRest
3333
/**
3434
* @var string
3535
*/
36-
private $userName;
36+
private $userId;
3737

3838
/**
3939
* @var string
@@ -48,7 +48,7 @@ class SauceRest
4848
*/
4949
public function __construct($userName, $accessKey)
5050
{
51-
$this->userName = $userName;
51+
$this->userId = $userName;
5252
$this->accessKey = $accessKey;
5353
}
5454

@@ -67,7 +67,7 @@ protected function execute($requestMethod, $url, $parameters = null)
6767
{
6868
$extraOptions = array(
6969
CURLOPT_HTTPAUTH => CURLAUTH_BASIC,
70-
CURLOPT_USERPWD => $this->userName . ':' . $this->accessKey,
70+
CURLOPT_USERPWD => $this->userId . ':' . $this->accessKey,
7171
);
7272

7373
$url = 'https://saucelabs.com/rest/v1/' . $url;
@@ -110,7 +110,7 @@ public function getAccountLimits()
110110
*/
111111
public function createSubAccount($accountInfo)
112112
{
113-
return $this->execute('POST', 'users/' . $this->userName, $accountInfo);
113+
return $this->execute('POST', 'users/' . $this->userId, $accountInfo);
114114
}
115115

116116
/**

0 commit comments

Comments
 (0)