diff options
Diffstat (limited to 'apps/dav/tests/unit/Files/FileSearchBackendTest.php')
-rw-r--r-- | apps/dav/tests/unit/Files/FileSearchBackendTest.php | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/apps/dav/tests/unit/Files/FileSearchBackendTest.php b/apps/dav/tests/unit/Files/FileSearchBackendTest.php index 20a7566c2fd..723fb9f4049 100644 --- a/apps/dav/tests/unit/Files/FileSearchBackendTest.php +++ b/apps/dav/tests/unit/Files/FileSearchBackendTest.php @@ -72,7 +72,7 @@ class FileSearchBackendTest extends TestCase { /** @var Directory|\PHPUnit_Framework_MockObject_MockObject */ private $davFolder; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->user = $this->createMock(IUser::class); @@ -258,10 +258,10 @@ class FileSearchBackendTest extends TestCase { $this->assertEquals('/files/test/test/path', $result[0]->href); } - /** - * @expectedException \InvalidArgumentException - */ + public function testSearchInvalidProp() { + $this->expectException(\InvalidArgumentException::class); + $this->tree->expects($this->any()) ->method('getNodeForPath') ->willReturn($this->davFolder); @@ -295,10 +295,10 @@ class FileSearchBackendTest extends TestCase { return new Query($select, $from, $where, $orderBy, $limit); } - /** - * @expectedException \InvalidArgumentException - */ + public function testSearchNonFolder() { + $this->expectException(\InvalidArgumentException::class); + $davNode = $this->createMock(File::class); $this->tree->expects($this->any()) |