From b431389d4a0c431713f62dc1b76afa3750066059 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Sat, 21 Jun 2025 13:43:25 +0100 Subject: [PATCH] Add daily email --- content/meta/index.json | 7 ++ ....20b8e2be-b5ec-404d-853e-55cf19327558.json | 97 +++++++++++++++++++ ....31bdc608-36ae-4024-bfdd-afbe4ac5bbae.json | 27 ++++++ 3 files changed, 131 insertions(+) create mode 100644 content/node.20b8e2be-b5ec-404d-853e-55cf19327558.json create mode 100644 content/path_alias.31bdc608-36ae-4024-bfdd-afbe4ac5bbae.json diff --git a/content/meta/index.json b/content/meta/index.json index faa70d17c..816004171 100644 --- a/content/meta/index.json +++ b/content/meta/index.json @@ -6493,5 +6493,12 @@ ], "redirect.714cbf00-2159-46b5-893e-67dd5da6013a": [ "user.b8966985-d4b2-42a7-a319-2e94ccfbb849" + ], + "node.20b8e2be-b5ec-404d-853e-55cf19327558": [ + "user.b8966985-d4b2-42a7-a319-2e94ccfbb849", + "node.e3f6c728-7855-4804-8614-e2a0c08c368f" + ], + "path_alias.31bdc608-36ae-4024-bfdd-afbe4ac5bbae": [ + "node.20b8e2be-b5ec-404d-853e-55cf19327558" ] } \ No newline at end of file diff --git a/content/node.20b8e2be-b5ec-404d-853e-55cf19327558.json b/content/node.20b8e2be-b5ec-404d-853e-55cf19327558.json new file mode 100644 index 000000000..9f09ac5c1 --- /dev/null +++ b/content/node.20b8e2be-b5ec-404d-853e-55cf19327558.json @@ -0,0 +1,97 @@ +{ + "uuid": [ + { + "value": "20b8e2be-b5ec-404d-853e-55cf19327558" + } + ], + "langcode": [ + { + "value": "en" + } + ], + "type": [ + { + "target_id": "daily_email", + "target_type": "node_type", + "target_uuid": "8bde1f2f-eef9-4f2d-ae9c-96921f8193d7" + } + ], + "revision_timestamp": [ + { + "value": "2025-06-21T12:44:54+00:00" + } + ], + "revision_uid": [ + { + "target_type": "user", + "target_uuid": "b8966985-d4b2-42a7-a319-2e94ccfbb849" + } + ], + "revision_log": [], + "status": [ + { + "value": true + } + ], + "uid": [ + { + "target_type": "user", + "target_uuid": "b8966985-d4b2-42a7-a319-2e94ccfbb849" + } + ], + "title": [ + { + "value": "Exploring Drupal Test Traits" + } + ], + "created": [ + { + "value": "2025-06-18T12:36:14+00:00" + } + ], + "changed": [ + { + "value": "2025-06-21T12:44:54+00:00" + } + ], + "promote": [ + { + "value": false + } + ], + "sticky": [ + { + "value": false + } + ], + "default_langcode": [ + { + "value": true + } + ], + "revision_translation_affected": [ + { + "value": true + } + ], + "path": [ + { + "alias": "\/daily\/2025\/06\/18\/exploring-drupal-test-traits", + "langcode": "en" + } + ], + "body": [ + { + "value": "I've [given talks and workshops][3] on automated testing in Drupal.\r\n\r\nI created [a free 10-day email course][2].\r\n\r\nSomething I haven't used until recently is [Drupal Test Traits][4].\r\n\r\nThe built-in PHPUnit tests create a new installation of Drupal for each test, setting up everything from scratch and installing the specified modules and configuration for each test.\r\n\r\nThe tests don't know about the site they're running on, which is what allows them to run in Drupal CI or on any Developer's computer.\r\n\r\nEach test is responsible for creating its own environment.\r\n\r\nThis is part of the \"arrange\" step of writing an automated test - creating the situation for the test to run, such as installing configuration and creating content, before performing actions and making assertions.\r\n\r\nBut, what if you want to test an existing website?\r\n\r\nDrupal Test Traits provides an `ExistingSiteBase` class and a number of traits that allow for testing an existing Drupal website and simplifies the setup process.\r\n\r\nYou can see this in [my PresentationTest class][0] - there's no setup like recreating content type and field configuration as it knows about the \"real\" site I'm working on.\r\n\r\nSome tests like [my PresentationCounterTest][1] I've had to write differently to count for the existing content, but still work.\r\n\r\nI'm going to continue trying out Drupal Test Traits and, if it continues to go well, include it in my future talks and workshops.\r\n\r\n[0]: https:\/\/code.oliverdavies.uk\/opdavies\/oliverdavies.uk\/src\/commit\/b8c3f6d9a761f126616f0be12d3c35dffef41bbe\/modules\/opd_presentations\/tests\/src\/Functional\/PresentationTest.php\r\n[1]: https:\/\/code.oliverdavies.uk\/opdavies\/oliverdavies.uk\/src\/commit\/b8c3f6d9a761f126616f0be12d3c35dffef41bbe\/modules\/opd_presentations\/tests\/src\/Functional\/PresentationCounterTest.php\r\n[2]: \/atdc\r\n[3]: \/presentations\/tdd-test-driven-drupal\r\n[4]: https:\/\/www.drupal.org\/project\/dtt", + "format": "markdown", + "processed": "

I've given talks and workshops<\/a> on automated testing in Drupal.<\/p>\n

I created a free 10-day email course<\/a>.<\/p>\n

Something I haven't used until recently is Drupal Test Traits<\/a>.<\/p>\n

The built-in PHPUnit tests create a new installation of Drupal for each test, setting up everything from scratch and installing the specified modules and configuration for each test.<\/p>\n

The tests don't know about the site they're running on, which is what allows them to run in Drupal CI or on any Developer's computer.<\/p>\n

Each test is responsible for creating its own environment.<\/p>\n

This is part of the \"arrange\" step of writing an automated test - creating the situation for the test to run, such as installing configuration and creating content, before performing actions and making assertions.<\/p>\n

But, what if you want to test an existing website?<\/p>\n

Drupal Test Traits provides an ExistingSiteBase<\/code> class and a number of traits that allow for testing an existing Drupal website and simplifies the setup process.<\/p>\n

You can see this in my PresentationTest class<\/a> - there's no setup like recreating content type and field configuration as it knows about the \"real\" site I'm working on.<\/p>\n

Some tests like my PresentationCounterTest<\/a> I've had to write differently to count for the existing content, but still work.<\/p>\n

I'm going to continue trying out Drupal Test Traits and, if it continues to go well, include it in my future talks and workshops.<\/p>\n", + "summary": "" + } + ], + "field_daily_email_cta": [ + { + "target_type": "node", + "target_uuid": "e3f6c728-7855-4804-8614-e2a0c08c368f" + } + ] +} \ No newline at end of file diff --git a/content/path_alias.31bdc608-36ae-4024-bfdd-afbe4ac5bbae.json b/content/path_alias.31bdc608-36ae-4024-bfdd-afbe4ac5bbae.json new file mode 100644 index 000000000..dcc3df34f --- /dev/null +++ b/content/path_alias.31bdc608-36ae-4024-bfdd-afbe4ac5bbae.json @@ -0,0 +1,27 @@ +{ + "uuid": [ + { + "value": "31bdc608-36ae-4024-bfdd-afbe4ac5bbae" + } + ], + "langcode": [ + { + "value": "en" + } + ], + "path": [ + { + "value": "\/node\/20b8e2be-b5ec-404d-853e-55cf19327558" + } + ], + "alias": [ + { + "value": "\/daily\/2025\/06\/18\/exploring-drupal-test-traits" + } + ], + "status": [ + { + "value": true + } + ] +} \ No newline at end of file