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

[make:crud] adding repository counts for crud testRemove #1117

Merged
merged 5 commits into from May 17, 2022

Conversation

dr-matt-smith
Copy link
Contributor

suggested asserts for the testRemove() method of the crud generated tests

  • count repository objects
  • add a new object
  • assert repository objects count is 1 more than originally
  • remove via CRUD form Delete
  • assert repository count has returned to original number

@jrushlow jrushlow added the Minor Minor Enhancement label May 16, 2022
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.

A couple minor changes and we should be good to go...

Comment on lines 118 to 120
self::assertSame($originalNumObjectsInRepository, count($this->repository->findAll()));

self::assertResponseRedirects('<?= $route_path; ?>/');
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
self::assertSame($originalNumObjectsInRepository, count($this->repository->findAll()));
self::assertResponseRedirects('<?= $route_path; ?>/');
self::assertSame($originalNumObjectsInRepository, count($this->repository->findAll()));
self::assertResponseRedirects('<?= $route_path; ?>/');

.gitignore Outdated Show resolved Hide resolved
@jrushlow jrushlow added the Status: Needs Work Additional work is needed label May 16, 2022
@jrushlow jrushlow changed the title adding repository counts for crud testRemove [make:crud] adding repository counts for crud testRemove May 16, 2022
@jrushlow jrushlow added Feature New Feature and removed Minor Minor Enhancement labels May 16, 2022
@dr-matt-smith
Copy link
Contributor Author

changes made as requested
(extra commit - I had to manually remove ./idea directory after removing that from .gitignore)
all good now I think ... matt ..

.gitignore Outdated Show resolved Hide resolved
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

@jrushlow jrushlow added Status: Reviewed Has been reviewed by a maintainer and removed Status: Needs Work Additional work is needed labels May 17, 2022
@jrushlow jrushlow merged commit 090f40b into symfony:main May 17, 2022
@jrushlow jrushlow mentioned this pull request May 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature New Feature Status: Reviewed Has been reviewed by a maintainer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants