Add daily email
This commit is contained in:
parent
f101e817fc
commit
b58aa19bd8
4 changed files with 98 additions and 2 deletions
|
@ -7088,5 +7088,12 @@
|
|||
],
|
||||
"path_alias.8d39e49f-61f7-45eb-b163-25fb33ad9f4d": [
|
||||
"node.6d274bb7-1d5a-43ca-b024-cf62cdae01aa"
|
||||
],
|
||||
"node.5a77f50e-a593-4a7f-b2b2-1a39114e9668": [
|
||||
"user.b8966985-d4b2-42a7-a319-2e94ccfbb849",
|
||||
"node.e3f6c728-7855-4804-8614-e2a0c08c368f"
|
||||
],
|
||||
"path_alias.c0009260-e116-4e4b-8638-f46658a1b955": [
|
||||
"node.5a77f50e-a593-4a7f-b2b2-1a39114e9668"
|
||||
]
|
||||
}
|
|
@ -7,7 +7,7 @@ type:
|
|||
target_type: node_type
|
||||
target_uuid: a6dfb70f-21fc-46e0-aa8c-45c5d0cef75f
|
||||
revision_timestamp:
|
||||
- value: '2025-07-07T21:13:28+00:00'
|
||||
- value: '2025-07-15T00:07:11+00:00'
|
||||
revision_uid:
|
||||
- target_type: user
|
||||
target_uuid: b8966985-d4b2-42a7-a319-2e94ccfbb849
|
||||
|
@ -22,7 +22,7 @@ title:
|
|||
created:
|
||||
- value: '2025-07-03T15:08:56+00:00'
|
||||
changed:
|
||||
- value: '2025-07-07T21:13:28+00:00'
|
||||
- value: '2025-07-15T00:07:11+00:00'
|
||||
promote:
|
||||
- value: false
|
||||
sticky:
|
||||
|
|
79
content/node.5a77f50e-a593-4a7f-b2b2-1a39114e9668.yml
Normal file
79
content/node.5a77f50e-a593-4a7f-b2b2-1a39114e9668.yml
Normal file
|
@ -0,0 +1,79 @@
|
|||
uuid:
|
||||
- value: 5a77f50e-a593-4a7f-b2b2-1a39114e9668
|
||||
langcode:
|
||||
- value: en
|
||||
type:
|
||||
- target_id: daily_email
|
||||
target_type: node_type
|
||||
target_uuid: 8bde1f2f-eef9-4f2d-ae9c-96921f8193d7
|
||||
revision_timestamp:
|
||||
- value: '2025-07-15T20:33:32+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: 'Drupal Test Traits is not a replacement for traditional tests'
|
||||
created:
|
||||
- value: '2025-07-13T20:31:38+00:00'
|
||||
changed:
|
||||
- value: '2025-07-15T20:33:32+00:00'
|
||||
promote:
|
||||
- value: false
|
||||
sticky:
|
||||
- value: false
|
||||
default_langcode:
|
||||
- value: true
|
||||
revision_translation_affected:
|
||||
- value: true
|
||||
path:
|
||||
- alias: /daily/2025/07/13/drupal-test-traits-not-replacement-traditional-tests
|
||||
langcode: en
|
||||
body:
|
||||
- value: |-
|
||||
I've recently been looking into [the Drupal Test Traits project][0].
|
||||
|
||||
In my previous talks and workshops, and my email course, I haven't covered Drupal Test Traits and stuck to using the existing Drupal test types - `BrowserTestBase`, `KernelTestBase`, etc.
|
||||
|
||||
I maybe assumed that it was a different approach to testing, like introducing a different testing tool.
|
||||
|
||||
I wanted to make sure I understood Drupal's core test types before looking into additional things like Drupal Test Traits.
|
||||
|
||||
Now I've looked into it, I know it's not a replacement for Drupal core tests - it's an extension of them.
|
||||
|
||||
It uses the same PHPUnit framework, but extends it with specific traits and classes for testing an existing Drupal site rather than creating a temporary website for each test.
|
||||
|
||||
This makes the setup much simpler, and easier for people to write their first working test.
|
||||
|
||||
And you can mix and match - not every test needs to implement the `ExistingSiteBase` class that Drupal Test Traits provides.
|
||||
|
||||
If a test is better written as a standard Functional test, you can still use the core classes as you need to.
|
||||
|
||||
You can even include the specific traits you need, giving you full control and flexibility.
|
||||
|
||||
I'll continue to teach the Drupal testing fundamentals, but in future versions, I'll include Drupal Test Traits too, and I'll be using it for any Drupal projects for clients or [my own website][1].
|
||||
|
||||
[0]: /daily/2025/06/18/exploring-drupal-test-traits
|
||||
[1]: https://code.oliverdavies.uk/opdavies/oliverdavies.uk
|
||||
format: markdown
|
||||
processed: |
|
||||
<p>I've recently been looking into <a href="http://localhost:8888/daily/2025/06/18/exploring-drupal-test-traits">the Drupal Test Traits project</a>.</p>
|
||||
<p>In my previous talks and workshops, and my email course, I haven't covered Drupal Test Traits and stuck to using the existing Drupal test types - <code>BrowserTestBase</code>, <code>KernelTestBase</code>, etc.</p>
|
||||
<p>I maybe assumed that it was a different approach to testing, like introducing a different testing tool.</p>
|
||||
<p>I wanted to make sure I understood Drupal's core test types before looking into additional things like Drupal Test Traits.</p>
|
||||
<p>Now I've looked into it, I know it's not a replacement for Drupal core tests - it's an extension of them.</p>
|
||||
<p>It uses the same PHPUnit framework, but extends it with specific traits and classes for testing an existing Drupal site rather than creating a temporary website for each test.</p>
|
||||
<p>This makes the setup much simpler, and easier for people to write their first working test.</p>
|
||||
<p>And you can mix and match - not every test needs to implement the <code>ExistingSiteBase</code> class that Drupal Test Traits provides.</p>
|
||||
<p>If a test is better written as a standard Functional test, you can still use the core classes as you need to.</p>
|
||||
<p>You can even include the specific traits you need, giving you full control and flexibility.</p>
|
||||
<p>I'll continue to teach the Drupal testing fundamentals, but in future versions, I'll include Drupal Test Traits too, and I'll be using it for any Drupal projects for clients or <a href="https://code.oliverdavies.uk/opdavies/oliverdavies.uk">my own website</a>.</p>
|
||||
summary: ''
|
||||
field_daily_email_cta:
|
||||
- target_type: node
|
||||
target_uuid: e3f6c728-7855-4804-8614-e2a0c08c368f
|
10
content/path_alias.c0009260-e116-4e4b-8638-f46658a1b955.yml
Normal file
10
content/path_alias.c0009260-e116-4e4b-8638-f46658a1b955.yml
Normal file
|
@ -0,0 +1,10 @@
|
|||
uuid:
|
||||
- value: c0009260-e116-4e4b-8638-f46658a1b955
|
||||
langcode:
|
||||
- value: en
|
||||
path:
|
||||
- value: /node/5a77f50e-a593-4a7f-b2b2-1a39114e9668
|
||||
alias:
|
||||
- value: /daily/2025/07/13/drupal-test-traits-not-replacement-traditional-tests
|
||||
status:
|
||||
- value: true
|
Loading…
Add table
Add a link
Reference in a new issue