Fix a few tests that were using too big int values for 32bits

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
pull/36120/head
Côme Chilliet 3 years ago
parent 7a628c0361
commit 0753be3ff2
No known key found for this signature in database
GPG Key ID: A3E2F658B28C760A
  1. 3
      apps/files_trashbin/tests/BackgroundJob/ExpireTrashTest.php
  2. 3
      apps/files_versions/tests/BackgroundJob/ExpireVersionsTest.php
  3. 3
      apps/provisioning_api/tests/Controller/UsersControllerTest.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');

@ -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);

@ -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(

Loading…
Cancel
Save