Used $l10n references in my unit test, this should allow it pass.

Signed-off-by: Ryan Fletcher <ryan.fletcher@codepassion.ca>
This commit is contained in:
Ryan Fletcher
2018-07-12 12:15:46 -04:00
parent 8d4dbd4d82
commit 3863c7497b

View File

@@ -133,31 +133,31 @@ class DefaultBoardServiceTest extends TestCase {
->willReturn($board);
$stackToDoId = '123';
$stackToDo = $this->assembleTestStack('To do', $stackToDoId, $boardId);
$stackToDo = $this->assembleTestStack($this->l10n->t('To do'), $stackToDoId, $boardId);
$stackDoingId = '124';
$stackDoing = $this->assembleTestStack('Doing', $stackDoingId, $boardId);
$stackDoing = $this->assembleTestStack($this->l10n->t('Doing'), $stackDoingId, $boardId);
$stackDoneId = '125';
$stackDone = $this->assembleTestStack('Done', $stackDoneId, $boardId);
$stackDone = $this->assembleTestStack($this->l10n->t('Done'), $stackDoneId, $boardId);
$this->stackService->expects($this->exactly(3))
->method('create')
->withConsecutive(
['To do', $boardId, 1],
['Doing', $boardId, 1],
['Done', $boardId, 1]
[$this->l10n->t('To do'), $boardId, 1],
[$this->l10n->t('Doing'), $boardId, 1],
[$this->l10n->t('Done'), $boardId, 1]
)
->willReturnOnConsecutiveCalls($stackToDo, $stackDoing, $stackDone);
$cardExampleTask3 = $this->assembleTestCard('Example Task 3', $stackToDoId, $this->userId);
$cardExampleTask2 = $this->assembleTestCard('Example Task 2', $stackDoingId, $this->userId);
$cardExampleTask1 = $this->assembleTestCard('Example Task 1', $stackDoneId, $this->userId);
$cardExampleTask3 = $this->assembleTestCard($this->l10n->t('Example Task 3'), $stackToDoId, $this->userId);
$cardExampleTask2 = $this->assembleTestCard($this->l10n->t('Example Task 2'), $stackDoingId, $this->userId);
$cardExampleTask1 = $this->assembleTestCard($this->l10n->t('Example Task 1'), $stackDoneId, $this->userId);
$this->cardService->expects($this->exactly(3))
->method('create')
->withConsecutive(
['Example Task 3', $stackToDoId, 'text', 0, $this->userId],
['Example Task 2', $stackDoingId, 'text', 0, $this->userId],
['Example Task 1', $stackDoneId, 'text', 0, $this->userId]
[$this->l10n->t('Example Task 3'), $stackToDoId, 'text', 0, $this->userId],
[$this->l10n->t('Example Task 2'), $stackDoingId, 'text', 0, $this->userId],
[$this->l10n->t('Example Task 1'), $stackDoneId, 'text', 0, $this->userId]
)
->willReturnonConsecutiveCalls($cardExampleTask3, $cardExampleTask2, $cardExampleTask1);