Skip to content

Commit 4aca3dd

Browse files
Fix MTime mock return value
1 parent a9c07bf commit 4aca3dd

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/phpbu/Backup/Cleaner/TestCase.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?php
22
namespace phpbu\App\Backup\Cleaner;
33

4+
use phpbu\App\Backup\File\Local;
45
use phpbu\App\Util\Str;
56

67
/**
@@ -39,7 +40,7 @@ protected function getFileMockList(array $files)
3940
$list[$index] = $this->getFileMock(
4041
isset($file['size']) ? $file['size'] : null,
4142
isset($file['shouldBeDeleted']) ? $file['shouldBeDeleted'] : null,
42-
isset($file['mTime']) ? $file['mTime'] : null,
43+
isset($file['mTime']) ? $file['mTime'] : 0,
4344
isset($file['writable']) ? $file['writable'] : true
4445
);
4546
}
@@ -58,7 +59,7 @@ protected function getFileMockList(array $files)
5859
protected function getFileMock($size, $shouldBeDeleted, $mTime, $writable)
5960
{
6061
/* @var $fileStub \PHPUnit\Framework\MockObject */
61-
$fileStub = $this->createMock(\phpbu\App\Backup\File\Local::class);
62+
$fileStub = $this->createMock(Local::class);
6263
$fileStub->method('getMTime')->willReturn($mTime);
6364
$fileStub->method('getSize')->willReturn($size);
6465
$fileStub->method('isWritable')->willReturn($writable);

0 commit comments

Comments
 (0)