-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: provokateurin <kate@provokateurin.de>
- Loading branch information
1 parent
64357f8
commit 3fb8b00
Showing
3 changed files
with
67 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/** | ||
* SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors | ||
* SPDX-License-Identifier: AGPL-3.0-or-later | ||
*/ | ||
|
||
namespace OCA\GroupFolders\Tests\Event; | ||
|
||
use OCA\GroupFolders\Event\GroupVersionsExpireDeleteFileEvent; | ||
use Test\TestCase; | ||
|
||
class GroupVersionsExpireDeleteFileEventTest extends TestCase { | ||
public function testProperties(): void { | ||
$event = new GroupVersionsExpireDeleteFileEvent(123); | ||
$this->assertEquals(123, $event->fileId); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/** | ||
* SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors | ||
* SPDX-License-Identifier: AGPL-3.0-or-later | ||
*/ | ||
|
||
namespace OCA\GroupFolders\Tests\Event; | ||
|
||
use OCA\GroupFolders\Event\GroupVersionsExpireDeleteVersionEvent; | ||
use OCA\GroupFolders\Versions\GroupVersion; | ||
use Test\TestCase; | ||
|
||
class GroupVersionsExpireDeleteVersionEventTest extends TestCase { | ||
public function testProperties(): void { | ||
$version = $this->createMock(GroupVersion::class); | ||
$version | ||
->expects($this->once()) | ||
->method('getFolderId') | ||
->willReturn(123); | ||
|
||
$event = new GroupVersionsExpireDeleteVersionEvent($version); | ||
$this->assertEquals(123, $event->version->getFolderId()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/** | ||
* SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors | ||
* SPDX-License-Identifier: AGPL-3.0-or-later | ||
*/ | ||
|
||
namespace OCA\GroupFolders\Tests\Event; | ||
|
||
use OCA\GroupFolders\Event\GroupVersionsExpireEnterFolderEvent; | ||
use Test\TestCase; | ||
|
||
class GroupVersionsExpireEnterFolderEventTest extends TestCase { | ||
public function testProperties(): void { | ||
$event = new GroupVersionsExpireEnterFolderEvent(['key' => 'value']); | ||
$this->assertEquals(['key' => 'value'], $event->folder); | ||
} | ||
} |