Commit graph

96 commits

Author SHA1 Message Date
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
383c0d0fdf Push to IFTTT
References #328
2021-01-10 19:14:24 +00:00
790b221646 Save post as sent to social media
References #328
2021-01-10 19:13:00 +00:00
e617e9984d Return early if the post shouldn't be pushed
References #328
2021-01-10 19:06:37 +00:00
73271de39a Move logic for if a post should be pushed
References #328
2021-01-10 19:06:36 +00:00
baebc4fd25 Add queue worker
References #328
2021-01-10 19:04:30 +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
ce7209ac74 Ensure that the translated text is rendered
Fixes #334
2021-01-04 22:01:42 +00:00
cb8afcd852 Update tweet text
References #332
2021-01-01 23:16:56 +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
d7459ff30f Extract a PostPusher service to push the post
Extract a `PostPusher` service with an IFTTT implementation. That means
if this needs to change to use a different service in the future, the
IFTTT implementation can remain unchanged and a new implementation can
be added with its own form params etc.

This also makes this functionality easier to test as we can add a
`NullPostPusher` implementation for testing.

References #332
2021-01-01 22:45:23 +00:00
f6ff21e04e Update form params to work with IFTTT
References #332
2021-01-01 22:34:59 +00:00
a6f378294c Extract a helper method to group checks [ci skip] 2021-01-01 21:50:35 +00:00
e2d7f08893 Rename variable to make it more generic 2021-01-01 21:46:12 +00:00
aab1114006 Reorder test class and method 2020-12-17 23:42:20 +00:00
509d526661 Update the Collection namespace 2020-12-17 23:42:20 +00:00
864c2429a5 Ensure that method names are in a consistent format 2020-12-17 23:42:20 +00:00
280a381c68 All test method should have a void return type 2020-12-17 23:42:20 +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
6edf584ac5 Remove illuminate/support dependency
References #302
2020-12-08 00:18:24 +00:00
352637b390 Enable lazy loading for recommendation images 2020-12-03 02:28:04 +00:00
a656280e7b Extract helper methods 2020-11-10 20:25:07 +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
19c5529094 Add Send to social media checkbox to posts
Also add it to the `opdavies_blog_test` module config so that the
existing tests continue to work and pass.

References #249
2020-10-07 23:17:07 +01:00
eb23d93fe0 Return early if should not be sent to social media
Return early and don't send the post to social media if the `Post to
social media` checkbox is not checked.

References #249
2020-10-07 23:11:22 +01:00
2d06f5e8d4 Add a method to check if send to social media
Add a method to check if a post should be sent automatically to social
media.

References #249
2020-10-07 22:57:40 +01:00
3809d5a02f Add token for getting the number of talks given
Add a new custom token, `[opdavies_talks:talk_count]`, that replaces the
placeholder text with the talk count value from the `TalkCounter`
service.

References #31
2020-09-16 01:25:09 +01: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
98fba9306f Fix PHPStan 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
9b26d772a8 Remove dashes in hashtags, and don't lowercase
References #24
2020-09-04 19:45:30 +01:00
9219d10137 Run on insert and update rather than pre-save 2020-09-04 19:19:18 +01:00
061b1177f5 Fix config names 2020-09-04 19:18:25 +01:00
2617e29dec Refactor to use a factory class 2020-09-04 13:46:49 +01:00
10e4616e01 Don't include certain terms as hashtags in tweets
References #24
2020-09-04 12:31:53 +01:00
c5c774290d Include tags as hashtags for automated tweets
References #24
2020-09-04 12:31:29 +01:00
150c974040 Add a test for converting a post to a tweet
References #24
2020-09-04 12:06:51 +01:00
b77c301d8c Refactor to use a short function 2020-08-28 18:01:47 +01:00
59f85f02d5 Add new dependencies to fix PostTest 2020-08-28 13:08:40 +01:00
92f1c0f84c Refactor sending posts to social media 2020-08-28 13:02:20 +01:00
59a98b8d78 Automatically re-order tags on save
Fixes #167
2020-08-28 12:56:57 +01:00
5e107b48d6 Move test class
References #203
2020-08-28 10:59:07 +01:00
ffe6fe9b68 Add tests for the TalkRepository
Fixes #203
2020-08-28 10:54:19 +01:00
9b1a8fb3be Rename and re-organise custom modules
- Rename `opd_talks` to `opdavies_talks`
- Rename `custom` to `opdavies_blog`
2020-08-24 10:27:49 +01:00