add update method to fake scheduled node repo

This commit is contained in:
Yisroel Baum 2026-05-01 09:05:55 +03:00
parent 1b2e44389c
commit 8eeff2c4fe
Signed by: yisroelbaum
GPG key ID: 0FA60884F75520A9

View file

@ -29,6 +29,19 @@ class FakeScheduledNodeRepository implements ScheduledNodeRepository
return $scheduledNode; return $scheduledNode;
} }
public function update(ScheduledNode $node): ScheduledNode
{
$this->existingScheduledNodes[$node->getId()] = $node;
return new ScheduledNode(
id: $node->getId(),
date: $node->getDate(),
plan: $node->getPlan(),
node: $node->getNode(),
completed: $node->getCompleted()
);
}
public function find(int $id): ?ScheduledNode public function find(int $id): ?ScheduledNode
{ {
return array_find( return array_find(