Commit graph

24 commits

Author SHA1 Message Date
cae2091436 build(deps): remove discoverable_entity_bundle_classes
As this module is no longer supported, remove it from the codebase and
update all references to it within the custom code - instead manually
wrapping nodes with the `Post` or `Talk` class, or returning it from a
Repository.

Fixes: #465
2021-12-17 23:05:41 +00:00
2a0a2d47fa Rename Action to UseCase
Rename to avoid confusion with Drupal's core Action type.
2021-05-24 22:31:01 +01:00
9a88301585 Add a new stub test
Add a new stub test to show that some tags such as "rst2pdf" are not
automatically capitalised when converting a post's tags into hashtags.
2021-05-24 22:23:03 +01:00
a5e2fcce63 Extract ConvertPostToTweetTest 2021-05-24 22:23:03 +01:00
9d1cbdeffd Use convertPostToTweet within the test
Use the convertPostToTweet action within the tests rather than calling
the toTweet() method, and delegate the Action to using the toTweet()
functionality.
2021-05-24 22:23:03 +01:00
23cc7cec2d Add the action to PostTest 2021-05-24 22:23:03 +01:00
e50a91dc30 Update queue name 2021-02-24 12:36:38 +00:00
17179fbfe4 Add a placeholder test, mark as skipped
References #344
2021-01-13 08:53:29 +00:00
ae0024f335 Return an empty Collection if there are no posts
Return an empty Collection if there are no related posts for the given
post.

References #3
2021-01-10 22:38:37 +00:00
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
d7f3d8c482 Return related posts for a specified blog post
Add the initial code for specifying a blog post and returning related
posts. This includes adding a repository for related posts, and adding
it as a service within the `opdavies_blog` module.

References #3
2021-01-10 22:38:00 +00:00
62424d5b04 Add PostTestBase
Add a base test for writing kernel tests for posts, so that it will be
easier to start writing the tests for related posts.

References #3
2021-01-10 22:37:28 +00:00
2e94abab55 Add some additional empty tests to fill in later 2021-01-10 20:00:14 +00:00
bbca137a83 Rename the test method 2021-01-10 19:57:08 +00:00
ec6ac1d798 Start refactoring to use a queue
References #328
2021-01-10 18:12:14 +00:00
af25afe2cf Test that a queue entry is added for a post
References #328
2021-01-10 18:11:11 +00:00
87ee87f915 Fix blog tag re-ordering test
Add a NullPostPusher implementation and use it within the tag
re-ordering tests to stop an Exception being thrown because there's no
webhook URL.

References #332
2021-01-01 23:08:23 +00:00
8591a0f846 Remove strict types in tests, ensure classes are final 2020-12-17 23:42:20 +00:00
a73adeca41 Fix incorrect namespace 2020-12-17 23:42:20 +00:00
0b1003a17d Ignore PHPCS rules per test file 2020-12-17 23:42:20 +00:00
06c3da1880 Add public constants for field names
Make it easier and safer when referencing field names by adding public
constants for them to the Talk and Post classes.
2020-11-10 19:34:15 +00:00
0f01551f26 Update Hook Event Dispatcher module
- Update the Hook Event Dispatcher module from `8.x-1.29` to `8.x-2.02`.
- Update custom modules after breaking changes from upgrading.

References #112
2020-09-06 12:15:59 +01:00
596ee4979d Fix PHPCS issues 2020-09-04 22:20:30 +01:00
cbe60209e6 Rename custom module directories
- Rename `opdavies_blog` to `blog`.
- Rename `opdavies_blog_test` to `blog_test`.
- Rename `opdavies_talks` to `talks`.
- Rename `opdavies_talks_test` to `talks_test`.

The files within the directories haven't changed, so there is no
breaking change caused by renaming the directories.

 Please enter the commit message for your changes. Lines starting
2020-09-04 21:25:36 +01:00