aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2023-01-23 11:41:17 +0100
committerCôme Chilliet <come.chilliet@nextcloud.com>2023-02-07 11:23:30 +0100
commit0753be3ff29b459bdbb23deecc37c3e4c05d8464 (patch)
treee4b652684c69dbd4095174ec2d26978da4406128
parent7a628c036132bad8eac152a1efcb4a15f42a44d6 (diff)
downloadnextcloud-server-0753be3ff29b459bdbb23deecc37c3e4c05d8464.tar.gz
nextcloud-server-0753be3ff29b459bdbb23deecc37c3e4c05d8464.zip
Fix a few tests that were using too big int values for 32bits
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
-rw-r--r--apps/files_trashbin/tests/BackgroundJob/ExpireTrashTest.php3
-rw-r--r--apps/files_versions/tests/BackgroundJob/ExpireVersionsTest.php3
-rw-r--r--apps/provisioning_api/tests/Controller/UsersControllerTest.php3
3 files changed, 3 insertions, 6 deletions
diff --git a/apps/files_trashbin/tests/BackgroundJob/ExpireTrashTest.php b/apps/files_trashbin/tests/BackgroundJob/ExpireTrashTest.php
index bf5d6bc65ae..3264c11f8fa 100644
--- a/apps/files_trashbin/tests/BackgroundJob/ExpireTrashTest.php
+++ b/apps/files_trashbin/tests/BackgroundJob/ExpireTrashTest.php
@@ -33,7 +33,6 @@ use OCP\IConfig;
use OCP\IUserManager;
use PHPUnit\Framework\MockObject\MockObject;
use Test\TestCase;
-use Psr\Log\LoggerInterface;
class ExpireTrashTest extends TestCase {
/** @var IConfig|MockObject */
@@ -61,7 +60,7 @@ class ExpireTrashTest extends TestCase {
$this->time = $this->createMock(ITimeFactory::class);
$this->time->method('getTime')
- ->willReturn(99999999999);
+ ->willReturn(999999999);
$this->jobList->expects($this->once())
->method('setLastRun');
diff --git a/apps/files_versions/tests/BackgroundJob/ExpireVersionsTest.php b/apps/files_versions/tests/BackgroundJob/ExpireVersionsTest.php
index 442a7020d89..1d5812767ca 100644
--- a/apps/files_versions/tests/BackgroundJob/ExpireVersionsTest.php
+++ b/apps/files_versions/tests/BackgroundJob/ExpireVersionsTest.php
@@ -33,7 +33,6 @@ use PHPUnit\Framework\MockObject\MockObject;
use Test\TestCase;
class ExpireVersionsTest extends TestCase {
-
/** @var IConfig|MockObject */
private $config;
@@ -70,7 +69,7 @@ class ExpireVersionsTest extends TestCase {
$timeFactory = $this->createMock(ITimeFactory::class);
$timeFactory->method('getTime')
->with()
- ->willReturn(99999999999);
+ ->willReturn(999999999);
$job = new ExpireVersions($this->config, $this->userManager, $this->expiration, $timeFactory);
$job->start($this->jobList);
diff --git a/apps/provisioning_api/tests/Controller/UsersControllerTest.php b/apps/provisioning_api/tests/Controller/UsersControllerTest.php
index e5c5678efd3..9e2da244f7b 100644
--- a/apps/provisioning_api/tests/Controller/UsersControllerTest.php
+++ b/apps/provisioning_api/tests/Controller/UsersControllerTest.php
@@ -73,7 +73,6 @@ use Psr\Log\LoggerInterface;
use Test\TestCase;
class UsersControllerTest extends TestCase {
-
/** @var IUserManager|MockObject */
protected $userManager;
/** @var IConfig|MockObject */
@@ -497,7 +496,7 @@ class UsersControllerTest extends TestCase {
->method('generate')
->with(10)
->willReturnCallback(function () {
- return (string)rand(1000000000, 9999999999);
+ return (string)rand(100000000, 999999999);
});
$this->assertTrue(key_exists(