Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2022-03-30 17:13:16 +0300
committerDaniel Calviño Sánchez <danxuliu@gmail.com>2022-05-24 19:54:29 +0300
commit8951f069fef6916bd293d278c2491b82bc349fc1 (patch)
treed452f49ff9b08b2797d244bb5634f28f7b6d14d5 /build/integration
parent53577ab34ae3e59b62fb57d35112b8f8d49d6de3 (diff)
Require a recent phpunit version in integration and acceptance
Otherwise build with PHP>8 will fail as PHPUnit 6 does not support it Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'build/integration')
-rw-r--r--build/integration/composer.json3
-rw-r--r--build/integration/features/bootstrap/AppConfiguration.php4
-rw-r--r--build/integration/features/bootstrap/CommandLine.php4
-rw-r--r--build/integration/features/bootstrap/CommandLineContext.php2
-rw-r--r--build/integration/features/bootstrap/Provisioning.php16
-rw-r--r--build/integration/features/bootstrap/Trashbin.php3
6 files changed, 17 insertions, 15 deletions
diff --git a/build/integration/composer.json b/build/integration/composer.json
index 0ab212b3cdf..a9ba7980064 100644
--- a/build/integration/composer.json
+++ b/build/integration/composer.json
@@ -1,6 +1,7 @@
{
"require-dev": {
- "phpunit/phpunit": "~6.5",
+ "phpunit/phpunit": "^9",
+ "dms/phpunit-arraysubset-asserts": "^0.4",
"behat/behat": "~3.10.0",
"guzzlehttp/guzzle": "7.4.2",
"jarnaiz/behat-junit-formatter": "^1.3",
diff --git a/build/integration/features/bootstrap/AppConfiguration.php b/build/integration/features/bootstrap/AppConfiguration.php
index 8cb9d1e1f02..740a8b169a6 100644
--- a/build/integration/features/bootstrap/AppConfiguration.php
+++ b/build/integration/features/bootstrap/AppConfiguration.php
@@ -96,9 +96,9 @@ trait AppConfiguration {
$this->sendingTo('get', '/cloud/apps?filter=enabled');
$this->theHTTPStatusCodeShouldBe('200');
if ($enabled) {
- Assert::assertContains('testing', $this->response->getBody()->getContents());
+ Assert::assertStringContainsString('testing', $this->response->getBody()->getContents());
} else {
- Assert::assertNotContains('testing', $this->response->getBody()->getContents());
+ Assert::assertStringNotContainsString('testing', $this->response->getBody()->getContents());
}
}
diff --git a/build/integration/features/bootstrap/CommandLine.php b/build/integration/features/bootstrap/CommandLine.php
index 0320f68f340..cba254551e0 100644
--- a/build/integration/features/bootstrap/CommandLine.php
+++ b/build/integration/features/bootstrap/CommandLine.php
@@ -141,13 +141,13 @@ trait CommandLine {
* @Then /^the command output contains the text "([^"]*)"$/
*/
public function theCommandOutputContainsTheText($text) {
- Assert::assertContains($text, $this->lastStdOut, 'The command did not output the expected text on stdout');
+ Assert::assertStringContainsString($text, $this->lastStdOut, 'The command did not output the expected text on stdout');
}
/**
* @Then /^the command error output contains the text "([^"]*)"$/
*/
public function theCommandErrorOutputContainsTheText($text) {
- Assert::assertContains($text, $this->lastStdErr, 'The command did not output the expected text on stderr');
+ Assert::assertStringContainsString($text, $this->lastStdErr, 'The command did not output the expected text on stderr');
}
}
diff --git a/build/integration/features/bootstrap/CommandLineContext.php b/build/integration/features/bootstrap/CommandLineContext.php
index 41756e448bf..afe17cd75a4 100644
--- a/build/integration/features/bootstrap/CommandLineContext.php
+++ b/build/integration/features/bootstrap/CommandLineContext.php
@@ -147,6 +147,6 @@ class CommandLineContext implements \Behat\Behat\Context\Context {
* @Then /^transfer folder name contains "([^"]+)"$/
*/
public function transferFolderNameContains($text) {
- Assert::assertContains($text, $this->lastTransferPath);
+ Assert::assertStringContainsString($text, $this->lastTransferPath);
}
}
diff --git a/build/integration/features/bootstrap/Provisioning.php b/build/integration/features/bootstrap/Provisioning.php
index 1b01a636918..7fb4188f919 100644
--- a/build/integration/features/bootstrap/Provisioning.php
+++ b/build/integration/features/bootstrap/Provisioning.php
@@ -175,7 +175,7 @@ trait Provisioning {
Assert::assertTrue(in_array($expected, $value['element'], true));
}
} elseif (isset($value[0])) {
- Assert::assertEquals($setting[1], $value[0], "", 0.0, 10, true);
+ Assert::assertEqualsCanonicalizing($setting[1], $value[0]);
} else {
Assert::assertEquals('', $setting[1]);
}
@@ -206,7 +206,7 @@ trait Provisioning {
foreach ($settings->getRows() as $setting) {
$value = json_decode(json_encode($groupDetails->{$setting[0]}), 1);
if (isset($value[0])) {
- Assert::assertEquals($setting[1], $value[0], "", 0.0, 10, true);
+ Assert::assertEqualsCanonicalizing($setting[1], $value[0]);
} else {
Assert::assertEquals('', $setting[1]);
}
@@ -399,7 +399,7 @@ trait Provisioning {
$this->response = $client->get($fullUrl, $options);
$groups = [$group];
$respondedArray = $this->getArrayOfGroupsResponded($this->response);
- Assert::assertNotEquals($groups, $respondedArray, "", 0.0, 10, true);
+ Assert::assertNotEqualsCanonicalizing($groups, $respondedArray);
Assert::assertEquals(200, $this->response->getStatusCode());
}
@@ -658,7 +658,7 @@ trait Provisioning {
$users = $usersList->getRows();
$usersSimplified = $this->simplifyArray($users);
$respondedArray = $this->getArrayOfUsersResponded($this->response);
- Assert::assertEquals($usersSimplified, $respondedArray, "", 0.0, 10, true);
+ Assert::assertEqualsCanonicalizing($usersSimplified, $respondedArray);
}
}
@@ -698,7 +698,7 @@ trait Provisioning {
$groups = $groupsList->getRows();
$groupsSimplified = $this->simplifyArray($groups);
$respondedArray = $this->getArrayOfGroupsResponded($this->response);
- Assert::assertEquals($groupsSimplified, $respondedArray, "", 0.0, 10, true);
+ Assert::assertEqualsCanonicalizing($groupsSimplified, $respondedArray);
}
}
@@ -711,7 +711,7 @@ trait Provisioning {
$groups = $groupsList->getRows();
$groupsSimplified = $this->simplifyArray($groups);
$respondedArray = $this->getArrayOfSubadminsResponded($this->response);
- Assert::assertEquals($groupsSimplified, $respondedArray, "", 0.0, 10, true);
+ Assert::assertEqualsCanonicalizing($groupsSimplified, $respondedArray);
}
}
@@ -724,7 +724,7 @@ trait Provisioning {
$apps = $appList->getRows();
$appsSimplified = $this->simplifyArray($apps);
$respondedArray = $this->getArrayOfAppsResponded($this->response);
- Assert::assertEquals($appsSimplified, $respondedArray, "", 0.0, 10, true);
+ Assert::assertEqualsCanonicalizing($appsSimplified, $respondedArray);
}
}
@@ -1000,7 +1000,7 @@ trait Provisioning {
Assert::assertFalse(in_array($expected, $value, true));
}
} else {
- Assert::assertNotEquals($setting[1], $value[0], "", 0.0, 10, true);
+ Assert::assertNotEqualsCanonicalizing($setting[1], $value[0]);
}
} else {
Assert::assertNotEquals('', $setting[1]);
diff --git a/build/integration/features/bootstrap/Trashbin.php b/build/integration/features/bootstrap/Trashbin.php
index f286147e3eb..998720b67b2 100644
--- a/build/integration/features/bootstrap/Trashbin.php
+++ b/build/integration/features/bootstrap/Trashbin.php
@@ -22,6 +22,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>
*
*/
+use DMS\PHPUnitExtensions\ArraySubset\Assert as AssertArraySubset;
use PHPUnit\Framework\Assert;
require __DIR__ . '/../../vendor/autoload.php';
@@ -138,7 +139,7 @@ trait Trashbin {
return $item['{http://nextcloud.org/ns}trashbin-filename'];
}, $elementList));
- Assert::assertArraySubset([$name], array_values($trashContent));
+ AssertArraySubset::assertArraySubset([$name], array_values($trashContent));
}
/**