Duplicate attachments & external links during task duplication & importing

This commit is contained in:
mundry
2023-03-25 03:48:32 +01:00
committed by GitHub
parent 39d78cf424
commit 59a4c7f73b
6 changed files with 62 additions and 4 deletions

View File

@@ -498,6 +498,12 @@ class ProjectDuplicationModelTest extends Base
public function testCloneProjectWithTasks()
{
$this->container['externalLinkManager'] = $this
->getMockBuilder('Kanboard\Core\ExternalLink\ExternalLinkManager')
->setConstructorArgs(array($this->container))
->setMethods(['push'])
->getMock();
$projectModel = new ProjectModel($this->container);
$projectDuplicationModel = new ProjectDuplicationModel($this->container);
$taskCreationModel = new TaskCreationModel($this->container);
@@ -522,6 +528,12 @@ class ProjectDuplicationModelTest extends Base
public function testCloneProjectWithSwimlanesAndTasks()
{
$this->container['externalLinkManager'] = $this
->getMockBuilder('Kanboard\Core\ExternalLink\ExternalLinkManager')
->setConstructorArgs(array($this->container))
->setMethods(['push'])
->getMock();
$projectModel = new ProjectModel($this->container);
$projectDuplicationModel = new ProjectDuplicationModel($this->container);
$swimlaneModel = new SwimlaneModel($this->container);
@@ -572,6 +584,12 @@ class ProjectDuplicationModelTest extends Base
public function testCloneProjectWithTags()
{
$this->container['externalLinkManager'] = $this
->getMockBuilder('Kanboard\Core\ExternalLink\ExternalLinkManager')
->setConstructorArgs(array($this->container))
->setMethods(['push'])
->getMock();
$projectModel = new ProjectModel($this->container);
$projectDuplicationModel = new ProjectDuplicationModel($this->container);
$taskCreationModel = new TaskCreationModel($this->container);