mirror of
https://github.com/nextcloud/server.git
synced 2026-04-15 22:11:17 -04:00
Fix a few tests that were using too big int values for 32bits
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
parent
7a628c0361
commit
0753be3ff2
3 changed files with 3 additions and 6 deletions
|
|
@ -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…
Reference in a new issue