{ "uuid": [ { "value": "c9c4743b-a803-47b3-8405-f6aeb34a279b" } ], "langcode": [ { "value": "en" } ], "type": [ { "target_id": "daily_email", "target_type": "node_type", "target_uuid": "8bde1f2f-eef9-4f2d-ae9c-96921f8193d7" } ], "revision_timestamp": [ { "value": "2025-05-11T09:00:18+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": "When should you start writing tests?" } ], "created": [ { "value": "2024-02-24T00:00:00+00:00" } ], "changed": [ { "value": "2025-05-11T09:00:18+00:00" } ], "promote": [ { "value": false } ], "sticky": [ { "value": false } ], "default_langcode": [ { "value": true } ], "revision_translation_affected": [ { "value": true } ], "path": [ { "alias": "\/daily\/2024\/02\/24\/when-should-you-start-writing-tests", "langcode": "en" } ], "body": [ { "value": "\n

When you start a new project, when should you start writing tests and doing test-driven development?<\/p>\n\n

Is it before you write any code, or is it something you can start later?<\/p>\n\n

When starting versa<\/a>, I was only scaffolding the console commands and running some basic commands such as \"composer install\" and \"phpunit\".<\/p>\n\n

At that point, there wasn't any business logic to test.<\/p>\n\n

The first versions only supported PHP, so there was no complexity around which language the project used.<\/p>\n\n

There was no logic to determine which language or package manager was used.<\/p>\n\n

Now I've started to add this functionality - such as determining the project type from its composer.json or package.json file - there is logic to test, and I've started to write tests and do test-driven development.<\/p>\n\n

At this phase, I can see the value, which I couldn't when setting up the application to begin with, and different have any logic worth testing.<\/p>\n\n ", "format": "full_html", "processed": "\n

When you start a new project, when should you start writing tests and doing test-driven development?<\/p>\n\n

Is it before you write any code, or is it something you can start later?<\/p>\n\n

When starting versa<\/a>, I was only scaffolding the console commands and running some basic commands such as \"composer install\" and \"phpunit\".<\/p>\n\n

At that point, there wasn't any business logic to test.<\/p>\n\n

The first versions only supported PHP, so there was no complexity around which language the project used.<\/p>\n\n

There was no logic to determine which language or package manager was used.<\/p>\n\n

Now I've started to add this functionality - such as determining the project type from its composer.json or package.json file - there is logic to test, and I've started to write tests and do test-driven development.<\/p>\n\n

At this phase, I can see the value, which I couldn't when setting up the application to begin with, and different have any logic worth testing.<\/p>\n\n ", "summary": null } ], "feeds_item": [ { "imported": "1970-01-01T00:33:45+00:00", "guid": null, "hash": "1579ff874773390b1129bfc1dc1f1c57", "target_type": "feeds_feed", "target_uuid": "90c85284-7ca8-4074-9178-97ff8384fe76" } ] }