Skip to content

Commit

Permalink
Favorite authors are taken for copywriting projects
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierre Ducoudray authored Jul 20, 2017
1 parent d702516 commit 3ac36a7
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,13 @@ public function updateProject(array $params)
$this->projects[$params['id']] = array_merge($this->projects[$params['id']], $params);
}

public function update($id, array $params)
{
$this->projects[$id] = array_merge($this->projects[$id], $params);

return $this->projects[$id];
}

public function authors($projectId)
{
return new ProjectAuthors($this->client, $projectId);
Expand Down
4 changes: 2 additions & 2 deletions Tests/Units/Translation/TranslationManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public function shouldCreateProject()
$projectMock->expects($this->once())
->method('setTextmasters')
->willReturn($projectMock);
$projectMock->expects($this->once())
$projectMock->expects($this->exactly(2))
->method('save')
->willReturn($projectMock);
$projectMock->expects($this->once())
Expand Down Expand Up @@ -126,7 +126,7 @@ public function shouldCreateProjectWithTranslationMemory()
$projectMock->expects($this->once())
->method('setWorkTemplate')
->willReturn($projectMock);
$projectMock->expects($this->exactly(2))
$projectMock->expects($this->exactly(3))
->method('save')
->willReturn($projectMock);
$projectMock->expects($this->once())
Expand Down
1 change: 1 addition & 0 deletions Translation/TranslationManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ public function create(
}, $authors);

$project->setTextmasters($ids);
$project->save();
}

$project->addDocuments($this->generateDocuments($project, $translatable));
Expand Down

0 comments on commit 3ac36a7

Please sign in to comment.