Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
language: php
php:
- 7.1
- 7.2
- 7.3
- 7.4snapshot

services:
- mysql
Expand Down Expand Up @@ -51,13 +51,13 @@ script:

matrix:
include:
- php: 7.1
- php: 7.3
env: DB=mysql
- php: 7.1
- php: 7.3
env: DB=pgsql
- php: 7.1
- php: 7.3
env: DB=mysql;CODECHECK=1
- php: 7.1
- php: 7.3
env: DB=mysql;CODECHECK=2
allow_failures:
- env: DB=mysql;CODECHECK=2
Expand Down
13 changes: 6 additions & 7 deletions tests/StorageWrapperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
use OCA\FilesAccessControl\StorageWrapper;
use OCP\Files\ForbiddenException;
use Test\TestCase;
use OCP\Files\Storage\IStorage;
use OCA\FilesAccessControl\Operation;

class StorageWrapperTest extends TestCase {

Expand All @@ -33,19 +35,16 @@ class StorageWrapperTest extends TestCase {
/** @var \OCA\FilesAccessControl\Operation|\PHPUnit_Framework_MockObject_MockObject */
protected $operation;

protected function setUp() {
protected function setUp(): void {
parent::setUp();

$this->storage = $this->getMockBuilder('OCP\Files\Storage\IStorage')
->getMock();
$this->storage = $this->createMock(IStorage::class);

$this->operation = $this->getMockBuilder('OCA\FilesAccessControl\Operation')
->disableOriginalConstructor()
->getMock();
$this->operation = $this->createMock(Operation::class);
}

protected function getInstance(array $methods = []) {
return $this->getMockBuilder('OCA\FilesAccessControl\StorageWrapper')
return $this->getMockBuilder(StorageWrapper::class)
->setConstructorArgs([
[
'storage' => $this->storage,
Expand Down
1 change: 0 additions & 1 deletion tests/phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8" ?>
<phpunit bootstrap="bootstrap.php"
strict="true"
verbose="true"
timeoutForSmallTests="900"
timeoutForMediumTests="900"
Expand Down