"value":"\n <p>There are multiple ways I've seen people write their test method names.<\/p>\n\n<p>This is the standard PSR-compliant camel-case method name:<\/p>\n\n<pre><code class=\"php\">public function testSomethingHappensWhenYouGoToThePage()\n<\/code><\/pre>\n\n<p>Some people find long camel-case names hard to read and prefer to use snake-case names:<\/p>\n\n<pre><code class=\"php\">public function test_something_happens_when_you_go_to_the_page()\n<\/code><\/pre>\n\n<p>This still works as the method name still starts with the word <code>test<\/code>, but you'd need to add some overrides to phpcs for it not to complain about using snake-case words.<\/p>\n\n<p>Another option is to remove the <code>test<\/code> prefix and use an annotation:<\/p>\n\n<pre><code class=\"php\">\/** @test *\/\npublic function something_happens_when_you_go_to_the_page()\n<\/code><\/pre>\n\n<p>And in newer PHPUnit versions, you can also use an attribute:<\/p>\n\n<pre><code class=\"php\">#[Test]\npublic function something_happens_when_you_go_to_the_page()\n<\/code><\/pre>\n\n<p>Whilst this makes the method name shorter, you need to add an additional line before each test method for the annotation or attribute.<\/p>\n\n<p>Each has pros and cons, and people have their own preferences.<\/p>\n\n<p>Which do you do?<\/p>\n\n ",
"format":"full_html",
"processed":"\n <p>There are multiple ways I've seen people write their test method names.<\/p>\n\n<p>This is the standard PSR-compliant camel-case method name:<\/p>\n\n<pre><code class=\"php\">public function testSomethingHappensWhenYouGoToThePage()\n<\/code><\/pre>\n\n<p>Some people find long camel-case names hard to read and prefer to use snake-case names:<\/p>\n\n<pre><code class=\"php\">public function test_something_happens_when_you_go_to_the_page()\n<\/code><\/pre>\n\n<p>This still works as the method name still starts with the word <code>test<\/code>, but you'd need to add some overrides to phpcs for it not to complain about using snake-case words.<\/p>\n\n<p>Another option is to remove the <code>test<\/code> prefix and use an annotation:<\/p>\n\n<pre><code class=\"php\">\/** @test *\/\npublic function something_happens_when_you_go_to_the_page()\n<\/code><\/pre>\n\n<p>And in newer PHPUnit versions, you can also use an attribute:<\/p>\n\n<pre><code class=\"php\">#[Test]\npublic function something_happens_when_you_go_to_the_page()\n<\/code><\/pre>\n\n<p>Whilst this makes the method name shorter, you need to add an additional line before each test method for the annotation or attribute.<\/p>\n\n<p>Each has pros and cons, and people have their own preferences.<\/p>\n\n<p>Which do you do?<\/p>\n\n ",