зеркало из https://github.com/nextcloud/spreed.git
Update some more request handling
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Родитель
d9ebc3da8e
Коммит
645bfc7dd4
|
@ -974,11 +974,9 @@ class FeatureContext implements Context, SnippetAcceptingContext {
|
|||
$deleted = false;
|
||||
|
||||
$this->deleteUser($user);
|
||||
try {
|
||||
$this->userExists($user);
|
||||
} catch (ClientException $ex) {
|
||||
$deleted = true;
|
||||
}
|
||||
|
||||
$response = $this->userExists($user);
|
||||
$deleted = $response->getStatusCode() === 404;
|
||||
|
||||
if (!$deleted) {
|
||||
Assert::fail("User $user exists");
|
||||
|
|
|
@ -25,7 +25,7 @@ use Behat\Behat\Context\Context;
|
|||
use Behat\Gherkin\Node\TableNode;
|
||||
use GuzzleHttp\Client;
|
||||
use GuzzleHttp\Cookie\CookieJar;
|
||||
use GuzzleHttp\Message\ResponseInterface;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
|
||||
class SharingContext implements Context {
|
||||
|
||||
|
@ -511,7 +511,7 @@ class SharingContext implements Context {
|
|||
|
||||
// Clean opcode cache
|
||||
$client = new GuzzleHttp\Client();
|
||||
$client->send($client->createRequest('GET', $this->baseUrl . '/apps/testing/clean_opcode_cache.php'));
|
||||
$client->request('GET', $this->baseUrl . '/apps/testing/clean_opcode_cache.php');
|
||||
|
||||
\PHPUnit\Framework\Assert::assertEquals(0, $lastCode);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче