Skip to content

Commit

Permalink
Add missing scenario for functional test
Browse files Browse the repository at this point in the history
  • Loading branch information
marekrzytki committed Jun 5, 2024
1 parent b2fcd82 commit d7df253
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion tests/Functional/Api/FrequentlyAskedQuestionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public function setUp(): void
$this->loadFixturesFromFile('Api/FrequentlyAskedQuestionTest/frequently_asked_question.yml');
}

public function test_block_response(): void
public function test_faq_response(): void
{
/** @var FrequentlyAskedQuestionInterface $faq */
$faq = $this->getRepository()->findOneEnabledByCode('faq1-code');
Expand All @@ -35,6 +35,14 @@ public function test_block_response(): void
$this->assertResponse($response, 'Api/FrequentlyAskedQuestionTest/test_it_get_frequently_asked_question_by_id', Response::HTTP_OK);
}

public function test_faqs_response(): void
{
$this->client->request('GET', '/api/v2/shop/cms-plugin/faq', [], [], self::CONTENT_TYPE_HEADER);
$response = $this->client->getResponse();

$this->assertResponse($response, 'Api/FrequentlyAskedQuestionTest/test_it_get_frequently_asked_questions', Response::HTTP_OK);
}

private function getRepository(): FrequentlyAskedQuestionRepositoryInterface
{
/** @var FrequentlyAskedQuestionRepositoryInterface $repository */
Expand Down

0 comments on commit d7df253

Please sign in to comment.