oliverdavies.uk/web/modules/custom/blog/tests/modules/blog_test
Oliver Davies 059e237600 Prevent duplicate terms being created
Within the `PostFactory` class, ensure that when using the `withTags`
method and creating tag terms that an existing term doesn't already
exist for a given name before trying to create it.

With the previous implementation, there would be multiple terms if the
PostFactory was used multiple times with the same tag name.

Given that `PostFactory` now has a dependency on `EntityTypeManger`,
this has been added as a service within `opdavies_blog_test` and needs
to be resolved from the container before trying to use it within a test.

This commit also updates the usages in `PostTest` so that those tests
continue to work and pass.

References #3
2021-01-10 22:38:36 +00:00
..
config/install Add Send to social media checkbox to posts 2020-10-07 23:17:07 +01:00
src/Factory Prevent duplicate terms being created 2021-01-10 22:38:36 +00:00
opdavies_blog_test.info.yml Rename custom module directories 2020-09-04 21:25:36 +01:00
opdavies_blog_test.services.yml Prevent duplicate terms being created 2021-01-10 22:38:36 +00:00