Skip to content
New issue

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

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

Already on GitHub? # to your account

[make:crud] fixed issues with make CRUD test Controller generation #1468

Merged
merged 1 commit into from
Feb 29, 2024

Conversation

dr-matt-smith
Copy link
Contributor

I found 3 issues preventing simple CRUD controller tests classes from passing
this changes the TPL template to address these issues

method: testNew()

  • bad path (sweet food!?) after creating new entity, changed to $this-path
  • call to $this->getRepository() (no such method) instead of $this->repository

method: testRemove()

  • needs to ADD (persist) fixture into DB to then visit show page and delete, change remove(...) to persist(...)

.. matt ..

@jrushlow jrushlow added Bug Bug Fix Status: Reviewed Has been reviewed by a maintainer labels Feb 29, 2024
@jrushlow jrushlow changed the title fixed issues with make CRUD test Controller generation [make:crud] fixed issues with make CRUD test Controller generation Feb 29, 2024
Copy link
Collaborator

@jrushlow jrushlow left a comment

Choose a reason for hiding this comment

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

Awesome! Thank you @dr-matt-smith - I noticed this bug a couple weeks ago and it totally slipped my mind.

@jrushlow jrushlow merged commit 2584cf7 into symfony:main Feb 29, 2024
6 checks passed
@dr-matt-smith
Copy link
Contributor Author

dr-matt-smith commented Mar 1, 2024 via email

@jrushlow jrushlow mentioned this pull request Mar 4, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Bug Bug Fix Status: Reviewed Has been reviewed by a maintainer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants