Skip to content

Instantly share code, notes, and snippets.

@shaneturner
Created September 27, 2016 00:22
Show Gist options
  • Save shaneturner/6dcbe049ce6146c6943ce308738aa1d5 to your computer and use it in GitHub Desktop.
Save shaneturner/6dcbe049ce6146c6943ce308738aa1d5 to your computer and use it in GitHub Desktop.
PHPUnit new test method converting descriptive text to snake_case method name
<snippet>
<content><![CDATA[
/**
* @test: ${1:This is what we are testing}
*
* @return void
*/
public function ${1/(\w)|(?: (\w))/(?1\l$1:)(?2_\l$2:)/g}()
{
\$this->assertTrue(true);
}
]]></content>
<tabTrigger>testm</tabTrigger>
<scope>source.php</scope>
</snippet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment