fake node repo
This commit is contained in:
parent
3d0d07385c
commit
c8f5f1343e
1 changed files with 17 additions and 0 deletions
17
tests/Fakes/FakeNodeRepository.php
Normal file
17
tests/Fakes/FakeNodeRepository.php
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
<?php
|
||||
|
||||
namespace Tests\Fakes;
|
||||
|
||||
use App\Node\CreateNodeDto;
|
||||
use App\Node\Node;
|
||||
use App\Node\NodeRepository;
|
||||
|
||||
class FakeNodeRepository implements NodeRepository
|
||||
{
|
||||
public function create(CreateNodeDto $dto): Node
|
||||
{
|
||||
return new Node(
|
||||
title: $dto->title,
|
||||
);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue