Skip to content
Closed
Prev Previous commit
Next Next commit
fix(tests): Fix share tests to test new reshare promotion system
Signed-off-by: Côme Chilliet <[email protected]>
  • Loading branch information
come-nc authored and backportbot[bot] committed Dec 3, 2024
commit 5bb30a8c3863fda51fe5a25d8e1f4d5d075b0593
10 changes: 5 additions & 5 deletions tests/lib/Share20/ManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ public function dataTestDelete() {
*/
public function testDelete($shareType, $sharedWith) {
$manager = $this->createManagerMock()
->setMethods(['getShareById', 'deleteChildren', 'deleteReshares'])
->setMethods(['getShareById', 'deleteChildren', 'promoteReshares'])
->getMock();

$manager->method('deleteChildren')->willReturn([]);
Expand All @@ -260,7 +260,7 @@ public function testDelete($shareType, $sharedWith) {
->setTarget('myTarget');

$manager->expects($this->once())->method('deleteChildren')->with($share);
$manager->expects($this->once())->method('deleteReshares')->with($share);
$manager->expects($this->once())->method('promoteReshares')->with($share);

$this->defaultProvider
->expects($this->once())
Expand All @@ -285,7 +285,7 @@ public function testDelete($shareType, $sharedWith) {

public function testDeleteLazyShare() {
$manager = $this->createManagerMock()
->setMethods(['getShareById', 'deleteChildren', 'deleteReshares'])
->setMethods(['getShareById', 'deleteChildren', 'promoteReshares'])
->getMock();

$manager->method('deleteChildren')->willReturn([]);
Expand All @@ -304,7 +304,7 @@ public function testDeleteLazyShare() {
$this->rootFolder->expects($this->never())->method($this->anything());

$manager->expects($this->once())->method('deleteChildren')->with($share);
$manager->expects($this->once())->method('deleteReshares')->with($share);
$manager->expects($this->once())->method('promoteReshares')->with($share);

$this->defaultProvider
->expects($this->once())
Expand All @@ -329,7 +329,7 @@ public function testDeleteLazyShare() {

public function testDeleteNested() {
$manager = $this->createManagerMock()
->setMethods(['getShareById', 'deleteReshares'])
->setMethods(['getShareById', 'promoteReshares'])
->getMock();

$path = $this->createMock(File::class);
Expand Down