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

Grf 361 create category template in database #18169

Merged
merged 16 commits into from
Oct 27, 2022
Merged

Grf 361 create category template in database #18169

merged 16 commits into from
Oct 27, 2022

Conversation

amigaire
Copy link
Contributor

@amigaire amigaire commented Oct 19, 2022

Description (for Contributor and Core Developer)

[WIP] The migration to create tables related to category template and attributes are not merged yet (GRF-357)

Definition Of Done (for Core Developer only)

  • Tests

@amigaire amigaire force-pushed the GRF-361 branch 2 times, most recently from 0b55eba to ef0a741 Compare October 25, 2022 15:23
@amigaire amigaire marked this pull request as ready for review October 25, 2022 15:30
$template =null;
if ($result) {
$template = new Template(
TemplateUuid::fromString($result['uuid']),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Create a Template::fromDatabase(array $result)

// TODO: activate SQL service instead of inMemory service in dependencies injection when GetTemplate->byUuid is implemented
$template = $this->get(GetTemplate::class)->byUuid((string) $templateModel->getUuid());

$this->assertEquals($templateModel->getCode(), $template->getCode());
Copy link
Contributor Author

Choose a reason for hiding this comment

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

create $expectedCode and use it with hadr coded value
same for labels, etc. (check toArray())

Copy link
Contributor Author

Choose a reason for hiding this comment

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

array_keys($template->getAttributeCollection()->getAttributes()),
);
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ajouter les tests de cas à la marge

@amigaire amigaire merged commit 0596be4 into GRF-289 Oct 27, 2022
@amigaire amigaire deleted the GRF-361 branch October 27, 2022 16:20
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.

None yet

3 participants