Skip to content

Commit eb955e6

Browse files
Merge pull request #62348 from nextcloud/backport/62346/stable22
[stable22] test: Fix unit test after last patch
2 parents 892970c + 42e07e1 commit eb955e6

7 files changed

Lines changed: 13 additions & 14 deletions

File tree

apps/federation/tests/Controller/OCSAuthAPIControllerTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@ public function testRequestSharedSecret($token, $localToken, $isTrustedServer, $
121121

122122
try {
123123
$this->ocsAuthApi->requestSharedSecret($url, $token);
124-
$this->assertTrue($ok);
125124
} catch (OCSForbiddenException $e) {
126125
$this->assertFalse($ok);
127126
}

build/integration/composer.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"require-dev": {
3-
"phpunit/phpunit": "~6.5",
4-
"behat/behat": "~3.11.0",
5-
"guzzlehttp/guzzle": "6.5.8",
3+
"phpunit/phpunit": "^8.5",
4+
"behat/behat": "^3.12.0",
5+
"guzzlehttp/guzzle": "^7.6.0",
66
"jarnaiz/behat-junit-formatter": "^1.3",
7-
"sabre/dav": "4.4.0",
8-
"symfony/event-dispatcher": "~5.3"
7+
"sabre/dav": "^4.4.0",
8+
"symfony/event-dispatcher": "^5.3"
99
}
1010
}

build/integration/features/bootstrap/Avatar.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ public function loggedInUserGetsTemporaryAvatarWith(string $statusCode) {
109109
* @param string $source
110110
*/
111111
public function loggedInUserPostsTemporaryAvatarFromFile(string $source) {
112-
$file = \GuzzleHttp\Psr7\stream_for(fopen($source, 'r'));
112+
$file = \GuzzleHttp\Psr7\Utils::streamFor(fopen($source, 'r'));
113113

114114
$this->sendingAToWithRequesttoken('POST', '/index.php/avatar',
115115
[

build/integration/features/bootstrap/ChecksumsContext.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ private function getPasswordForUser($userName) {
7979
* @param string $checksum
8080
*/
8181
public function userUploadsFileToWithChecksum($user, $source, $destination, $checksum) {
82-
$file = \GuzzleHttp\Psr7\stream_for(fopen($source, 'r'));
82+
$file = \GuzzleHttp\Psr7\Utils::streamFor(fopen($source, 'r'));
8383
try {
8484
$this->response = $this->client->put(
8585
$this->baseUrl . '/remote.php/webdav' . $destination,

build/integration/features/bootstrap/FilesDropContext.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public function droppingFileWith($path, $content) {
5151
$options['headers'] = [
5252
'X-REQUESTED-WITH' => 'XMLHttpRequest'
5353
];
54-
$options['body'] = \GuzzleHttp\Psr7\stream_for($content);
54+
$options['body'] = \GuzzleHttp\Psr7\Utils::streamFor($content);
5555

5656
try {
5757
$this->response = $client->request('PUT', $fullUrl, $options);

build/integration/features/bootstrap/WebDav.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,7 @@ public function checkElementList($user, $expectedElements) {
454454
* @param string $destination
455455
*/
456456
public function userUploadsAFileTo($user, $source, $destination) {
457-
$file = \GuzzleHttp\Psr7\stream_for(fopen($source, 'r'));
457+
$file = \GuzzleHttp\Psr7\Utils::streamFor(fopen($source, 'r'));
458458
try {
459459
$this->response = $this->makeDavRequest($user, "PUT", $destination, [], $file);
460460
} catch (\GuzzleHttp\Exception\ServerException $e) {
@@ -486,7 +486,7 @@ public function userAddsAFileTo($user, $bytes, $destination) {
486486
* @When User :user uploads file with content :content to :destination
487487
*/
488488
public function userUploadsAFileWithContentTo($user, $content, $destination) {
489-
$file = \GuzzleHttp\Psr7\stream_for($content);
489+
$file = \GuzzleHttp\Psr7\Utils::streamFor($content);
490490
try {
491491
$this->response = $this->makeDavRequest($user, "PUT", $destination, [], $file);
492492
} catch (\GuzzleHttp\Exception\ServerException $e) {
@@ -544,7 +544,7 @@ public function userCreatedAFolder($user, $destination) {
544544
*/
545545
public function userUploadsChunkFileOfWithToWithChecksum($user, $num, $total, $data, $destination) {
546546
$num -= 1;
547-
$data = \GuzzleHttp\Psr7\stream_for($data);
547+
$data = \GuzzleHttp\Psr7\Utils::streamFor($data);
548548
$file = $destination . '-chunking-42-' . $total . '-' . $num;
549549
$this->makeDavRequest($user, 'PUT', $file, ['OC-Chunked' => '1'], $data, "uploads");
550550
}
@@ -561,7 +561,7 @@ public function userCreatesANewChunkingUploadWithId($user, $id) {
561561
* @Given user :user uploads new chunk file :num with :data to id :id
562562
*/
563563
public function userUploadsNewChunkFileOfWithToId($user, $num, $data, $id) {
564-
$data = \GuzzleHttp\Psr7\stream_for($data);
564+
$data = \GuzzleHttp\Psr7\Utils::streamFor($data);
565565
$destination = '/uploads/' . $user . '/' . $id . '/' . $num;
566566
$this->makeDavRequest($user, 'PUT', $destination, [], $data, "uploads");
567567
}

build/integration/run.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ else
2626
fi
2727
NC_DATADIR=$($OCC config:system:get datadirectory)
2828

29-
composer install --no-audit
29+
composer install
3030

3131
# avoid port collision on jenkins - use $EXECUTOR_NUMBER
3232
if [ -z "$EXECUTOR_NUMBER" ]; then

0 commit comments

Comments
 (0)