Adjust integration test
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
4ed296db9f
commit
83e10b7a73
|
@ -138,7 +138,13 @@ class RemoteContext implements Context {
|
||||||
* @param string $value
|
* @param string $value
|
||||||
*/
|
*/
|
||||||
public function hasCapability($key, $value) {
|
public function hasCapability($key, $value) {
|
||||||
$capabilities = $this->getApiClient()->getCapabilities();
|
try {
|
||||||
|
$capabilities = $this->getApiClient()->getCapabilities();
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
Assert::assertInstanceOf($value, $e);
|
||||||
|
$this->lastException = $e;
|
||||||
|
return;
|
||||||
|
}
|
||||||
$current = $capabilities;
|
$current = $capabilities;
|
||||||
$parts = explode('.', $key);
|
$parts = explode('.', $key);
|
||||||
foreach ($parts as $part) {
|
foreach ($parts as $part) {
|
||||||
|
|
|
@ -34,4 +34,5 @@ Feature: remote
|
||||||
Given using remote server "REMOTE"
|
Given using remote server "REMOTE"
|
||||||
And user "user0" exists
|
And user "user0" exists
|
||||||
And using credentials "user0", "invalid"
|
And using credentials "user0", "invalid"
|
||||||
Then the capability "theming.name" is "Nextcloud"
|
Then the capability "theming.name" is "OC\ForbiddenException"
|
||||||
|
Then the request should throw a "OC\ForbiddenException"
|
||||||
|
|
Loading…
Reference in New Issue