Skip to content

Commit 1aecbde

Browse files
committed
Fix unit tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
1 parent eda8560 commit 1aecbde

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

tests/StorageWrapperTest.php

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
use OCA\FilesAccessControl\StorageWrapper;
2525
use OCP\Files\ForbiddenException;
2626
use Test\TestCase;
27+
use OCP\Files\Storage\IStorage;
28+
use OCA\FilesAccessControl\Operation;
2729

2830
class StorageWrapperTest extends TestCase {
2931

@@ -36,16 +38,13 @@ class StorageWrapperTest extends TestCase {
3638
protected function setUp(): void {
3739
parent::setUp();
3840

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

42-
$this->operation = $this->getMockBuilder('OCA\FilesAccessControl\Operation')
43-
->disableOriginalConstructor()
44-
->getMock();
43+
$this->operation = $this->createMock(Operation::class);
4544
}
4645

4746
protected function getInstance(array $methods = []) {
48-
return $this->getMockBuilder('OCA\FilesAccessControl\StorageWrapper')
47+
return $this->getMockBuilder(StorageWrapper::class)
4948
->setConstructorArgs([
5049
[
5150
'storage' => $this->storage,

tests/phpunit.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<?xml version="1.0" encoding="utf-8" ?>
22
<phpunit bootstrap="bootstrap.php"
3-
strict="true"
43
verbose="true"
54
timeoutForSmallTests="900"
65
timeoutForMediumTests="900"

0 commit comments

Comments
 (0)