Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create endpoint and formatter for gather cms data #142

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

joyet-simon
Copy link
Contributor

Reason for change

Linear task
We need to implement new endpoint to save an url for gathering CMS data.

Code changes

  • Add new endpoint in Merchants.php file
  • Add a formatter for gathering CMS data payload
  • Add CmsInfos and CmsFeatures Entity
  • Add some unit tests

How to test

As a reviewer, you are encouraged to test the PR locally.

You can run unit tests

Checklist for authors and reviewers

  • The title of the PR uses business wording, not technical jargon, for the changelog readers to understand it
  • The PR implements the changes asked in the referenced task / issue
  • The automated tests are compliant with the testing strategy
  • The tests are relevant, and cover the corner/error cases, not only the happy path
  • You understand the impact of this PR on existing code/features
  • The changes include adequate logging and Datadog traces
  • Documentation is updated (API, developer documentation, ADR, Notion...)

Non applicable

@joyet-simon joyet-simon requested a review from a team as a code owner October 16, 2024 14:21
src/Endpoints/Merchants.php Outdated Show resolved Hide resolved
src/Entities/MerchantData/CmsFeatures.php Outdated Show resolved Hide resolved
src/Entities/MerchantData/CmsFeatures.php Outdated Show resolved Hide resolved
src/Entities/MerchantData/CmsInfo.php Outdated Show resolved Hide resolved
tests/Unit/Entities/CmsFeaturesTest.php Show resolved Hide resolved
tests/Unit/Entities/CmsInfoTest.php Show resolved Hide resolved
src/Lib/PayloadFormatter.php Outdated Show resolved Hide resolved
src/Lib/PayloadFormatter.php Outdated Show resolved Hide resolved

public function setUp(): void
{
$this->merchantEndpoint = Mockery::mock(Merchants::class)->makePartial();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't want to remove Mockery and use native mock ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When we want to test an endpoint, I'm note sure we can do it without a makePartial

Benjamin-Freoua-Alma

This comment was marked as off-topic.

Copy link
Member

@Benjamin-Freoua-Alma Benjamin-Freoua-Alma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some comments has been see in mob review :)

Copy link

sonarcloud bot commented Oct 17, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
4.9% Duplication on New Code (required ≤ 3%)

See analysis details on SonarCloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants