-
Notifications
You must be signed in to change notification settings - Fork 717
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a754379
commit f09204c
Showing
4 changed files
with
74 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -275,34 +275,40 @@ public function testRevokeTokenBadResponse(): void | |
|
||
public function testGetUser(): void | ||
{ | ||
$handler = $this->createMockResponse(200, '{ | ||
"data": { | ||
"userIdentity": { | ||
"id": 12345, | ||
"activeContact": { | ||
"id": 263425, | ||
"firstName": "Alice", | ||
"lastName": "Bob", | ||
"email": "[email protected]", | ||
"isWptPaidUser": true, | ||
"isWptAccountVerified": true, | ||
"companyName": null | ||
}, | ||
"levelSummary": { | ||
"levelId": 3, | ||
"isWptEnterpriseClient": false | ||
$handler = $this->createMockResponse( | ||
200, | ||
'{ | ||
"data": { | ||
"userIdentity": { | ||
"id": 12345, | ||
"activeContact": { | ||
"id": 263425, | ||
"firstName": "Alice", | ||
"lastName": "Bob", | ||
"email": "[email protected]", | ||
"isWptPaidUser": true, | ||
"isWptAccountVerified": true, | ||
"companyName": null | ||
}, | ||
"levelSummary": { | ||
"levelId": 3, | ||
"isWptEnterpriseClient": false | ||
} | ||
}, | ||
"wptCustomer": { | ||
"remainingRuns": 300, | ||
"monthlyRuns": 3000, | ||
"subscriptionId": "518235", | ||
"planRenewalDate": "2125-12-25", | ||
"status": "ACTIVE", | ||
"vatNumber": null | ||
}, | ||
"wptIsPreviewEnabled": { | ||
"enabled": false | ||
} | ||
} | ||
}, | ||
"wptCustomer": { | ||
"remainingRuns": 300, | ||
"monthlyRuns": 3000, | ||
"subscriptionId": "518235", | ||
"planRenewalDate": "2125-12-25", | ||
"status": "ACTIVE", | ||
"vatNumber": null | ||
} | ||
} | ||
}'); | ||
}' | ||
); | ||
$host = "http://webpagetest.org"; | ||
$client = new CPClient($host, array( | ||
'auth_client_options' => [ | ||
|
@@ -513,18 +519,18 @@ public function testGetWptPlans(): void | |
} | ||
}'); | ||
|
||
$host = "http://webpagetest.org"; | ||
$client = new CPClient($host, array( | ||
'auth_client_options' => [ | ||
'client_id' => '123', | ||
'client_secret' => '345', | ||
'grant_type' => 'these are good to have', | ||
'handler' => $handler | ||
] | ||
)); | ||
$host = "http://webpagetest.org"; | ||
$client = new CPClient($host, array( | ||
'auth_client_options' => [ | ||
'client_id' => '123', | ||
'client_secret' => '345', | ||
'grant_type' => 'these are good to have', | ||
'handler' => $handler | ||
] | ||
)); | ||
|
||
$plans = $client->getWptPlans(); | ||
$this->assertEquals(3, count($plans)); | ||
$plans = $client->getWptPlans(); | ||
$this->assertEquals(3, count($plans)); | ||
} | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters