"value":"\n <p>To do test-driven development, you start by writing a test which, because you're testing code that doesn't exist, will fail.<\/p>\n\n<p>The objective is to get the get the test to pass.<\/p>\n\n<p>You want to write just enough code to get the test to pass.<\/p>\n\n<p>It can be the simplest and naive code possible as long as it gets the tests to pass.<\/p>\n\n<p>Once the test passes, you can refactor and change the code in any way you want.<\/p>\n\n<p>This may be changing from a <code>foreach<\/code> loop to using a function like <code>array_map<\/code> or <code>array_reduce<\/code>, or splitting logic into separate classes.<\/p>\n\n<p>You may refactor your refactor and decide that a name or approach isn't correct and change it.<\/p>\n\n<p>You may split your code into service classes and then decide to use commands or actions.<\/p>\n\n<p>You can make whatever changes you want as long as the tests continue to pass.<\/p>\n\n<p>The implementation can change, but the outcome stays the same.<\/p>\n\n ",
"format":"full_html",
"processed":"\n <p>To do test-driven development, you start by writing a test which, because you're testing code that doesn't exist, will fail.<\/p>\n\n<p>The objective is to get the get the test to pass.<\/p>\n\n<p>You want to write just enough code to get the test to pass.<\/p>\n\n<p>It can be the simplest and naive code possible as long as it gets the tests to pass.<\/p>\n\n<p>Once the test passes, you can refactor and change the code in any way you want.<\/p>\n\n<p>This may be changing from a <code>foreach<\/code> loop to using a function like <code>array_map<\/code> or <code>array_reduce<\/code>, or splitting logic into separate classes.<\/p>\n\n<p>You may refactor your refactor and decide that a name or approach isn't correct and change it.<\/p>\n\n<p>You may split your code into service classes and then decide to use commands or actions.<\/p>\n\n<p>You can make whatever changes you want as long as the tests continue to pass.<\/p>\n\n<p>The implementation can change, but the outcome stays the same.<\/p>\n\n ",