oliverdavies.uk/content/node.a4efc095-f78d-45ae-854d-fc52c8afa41b.json

91 lines
3 KiB
JSON
Raw Normal View History

2025-05-11 07:15:45 +01:00
{
"uuid": [
{
2025-05-11 09:40:11 +01:00
"value": "a4efc095-f78d-45ae-854d-fc52c8afa41b"
2025-05-11 07:15:45 +01:00
}
],
"langcode": [
{
"value": "en"
}
],
"type": [
{
"target_id": "daily_email",
"target_type": "node_type",
"target_uuid": "8bde1f2f-eef9-4f2d-ae9c-96921f8193d7"
}
],
"revision_timestamp": [
{
2025-05-11 09:40:11 +01:00
"value": "2025-05-11T09:00:08+00:00"
2025-05-11 07:15:45 +01: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": "Docblocks or attributes?"
}
],
"created": [
{
"value": "2024-08-15T00:00:00+00:00"
}
],
"changed": [
{
2025-05-11 09:40:11 +01:00
"value": "2025-05-11T09:00:08+00:00"
2025-05-11 07:15:45 +01:00
}
],
"promote": [
{
"value": false
}
],
"sticky": [
{
"value": false
}
],
"default_langcode": [
{
"value": true
}
],
"revision_translation_affected": [
{
"value": true
}
],
"path": [
{
"alias": "\/daily\/2024\/08\/15\/docblocks-or-attributes",
"langcode": "en"
}
],
"body": [
{
2025-05-30 02:14:32 +01:00
"value": "\n <p>As Drupal 11 uses PHPUnit 10, we can now use the <code>#[Test]<\/code> attribute instead of the <code>\/** @test *\/<\/code> annotation for our test methods.<\/p>\n\n<p>For example:<\/p>\n\n<pre><code class=\"php\">\/\/ Before.\n\n\/** @test *\/\npublic function it_returns_the_endpoint()\n\n\/\/ After.\n\n#[Test]\npublic function it_returns_the_endpoint()\n<\/code><\/pre>\n\n<p><a href=\"\/daily\/2024\/04\/04\/php-attributes--coming-soon-to-a-drupal-version-near-you\">Annotations have started to be replaced<\/a> in parts of Drupal since 10.2, so it's nice to be able to do it with tests, too.<\/p>\n\n<p>Which do you prefer?<\/p>\n\n ",
2025-05-11 07:15:45 +01:00
"format": "full_html",
2025-05-30 02:14:32 +01:00
"processed": "\n <p>As Drupal 11 uses PHPUnit 10, we can now use the <code>#[Test]<\/code> attribute instead of the <code>\/** @test *\/<\/code> annotation for our test methods.<\/p>\n\n<p>For example:<\/p>\n\n<pre><code class=\"php\">\/\/ Before.\n\n\/** @test *\/\npublic function it_returns_the_endpoint()\n\n\/\/ After.\n\n#[Test]\npublic function it_returns_the_endpoint()\n<\/code><\/pre>\n\n<p><a href=\"http:\/\/default\/daily\/2024\/04\/04\/php-attributes--coming-soon-to-a-drupal-version-near-you\">Annotations have started to be replaced<\/a> in parts of Drupal since 10.2, so it's nice to be able to do it with tests, too.<\/p>\n\n<p>Which do you prefer?<\/p>\n\n ",
2025-05-11 07:15:45 +01:00
"summary": null
}
]
}