Skip to content

Commit

Permalink
Adapt test to also run isolated
Browse files Browse the repository at this point in the history
Signed-off-by: Julius Härtl <jus@bitgrid.net>
  • Loading branch information
juliusknorr committed Aug 29, 2022
1 parent 1d26f2a commit 1451f49
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions apps/dav/tests/unit/Connector/Sabre/DirectoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
use OCA\DAV\Connector\Sabre\Directory;
use OCP\Files\ForbiddenException;
use OCP\Files\Mount\IMountPoint;
use Test\Traits\UserTrait;

class TestViewDirectory extends \OC\Files\View {
private $updatables;
Expand Down Expand Up @@ -73,6 +74,8 @@ public function getRelativePath($path) {
*/
class DirectoryTest extends \Test\TestCase {

use UserTrait;

/** @var \OC\Files\View | \PHPUnit\Framework\MockObject\MockObject */
private $view;
/** @var \OC\Files\FileInfo | \PHPUnit\Framework\MockObject\MockObject */
Expand Down Expand Up @@ -274,6 +277,8 @@ public function testGetChildThrowInvalidPath() {
}

public function testGetQuotaInfoUnlimited() {
self::createUser('user', 'password');
self::loginAsUser('user');
$mountPoint = $this->createMock(IMountPoint::class);
$storage = $this->getMockBuilder(Quota::class)
->disableOriginalConstructor()
Expand Down Expand Up @@ -315,6 +320,8 @@ public function testGetQuotaInfoUnlimited() {
}

public function testGetQuotaInfoSpecific() {
self::createUser('user', 'password');
self::loginAsUser('user');
$mountPoint = $this->createMock(IMountPoint::class);
$storage = $this->getMockBuilder(Quota::class)
->disableOriginalConstructor()
Expand Down

0 comments on commit 1451f49

Please sign in to comment.