add find by text id method to node repo w/ impl
This commit is contained in:
parent
1c28f46872
commit
4f83ae7926
2 changed files with 15 additions and 0 deletions
|
|
@ -48,4 +48,14 @@ class FakeNodeRepository implements NodeRepository
|
|||
parentNode: $node->getParentNode(),
|
||||
);
|
||||
}
|
||||
|
||||
public function findByTextId(int $id): array
|
||||
{
|
||||
return array_filter(
|
||||
$this->existingNodes,
|
||||
function (Node $node) use ($id) {
|
||||
return $node->getId() === $id;
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue