tests: Adapt tests

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl
2023-02-15 16:40:46 +01:00
parent c1e29ab8cb
commit 133e3f3140
7 changed files with 44 additions and 26 deletions

View File

@@ -110,10 +110,12 @@ class StackServiceTest extends TestCase {
public function testFindAll() {
$this->permissionService->expects($this->once())->method('checkPermission');
$this->stackMapper->expects($this->once())->method('findAll')->willReturn($this->getStacks());
$this->cardService->expects($this->atLeastOnce())->method('enrich')->will(
$this->cardService->expects($this->atLeastOnce())->method('enrichCards')->will(
$this->returnCallback(
function ($card) {
$card->setLabels($this->getLabels()[$card->getId()]);
function ($cards) {
foreach ($cards as $card) {
$card->setLabels($this->getLabels()[$card->getId()]);
}
}
)
);