diff --git a/tests/e2e/Controllers/TextControllerTest.php b/tests/e2e/Controllers/TextControllerTest.php index 5788360..aeee9a9 100644 --- a/tests/e2e/Controllers/TextControllerTest.php +++ b/tests/e2e/Controllers/TextControllerTest.php @@ -8,6 +8,7 @@ use App\Text\UseCases\CreateText; use PHPUnit\Framework\TestCase; use Slim\Psr7\Factory\ServerRequestFactory; use Slim\Psr7\Response; +use Tests\Fakes\FakeNodeRepository; use Tests\Fakes\FakeTextRepository; class TextControllerTest extends TestCase @@ -22,7 +23,7 @@ class TextControllerTest extends TestCase $this->textRepo->create(new CreateTextDto( name: 'test text', )); - $this->controller = new TextController($this->textRepo); + $this->controller = new TextController($this->textRepo, new FakeNodeRepository); } public function test_get_one_text(): void @@ -70,7 +71,10 @@ class TextControllerTest extends TestCase $response = $this->controller->createText( $request, new Response(), - new CreateText($this->textRepo), + new CreateText( + $this->textRepo, + new FakeNodeRepository, + ), ); $this->assertEquals( json_encode([