Skip to content

Commit

Permalink
Add phpunit v6 snippet (honza#995)
Browse files Browse the repository at this point in the history
  • Loading branch information
ernestre authored and lpil committed Oct 27, 2017
1 parent 221a77d commit fd93894
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions UltiSnips/php.snippets
Original file line number Diff line number Diff line change
Expand Up @@ -257,4 +257,30 @@ snip.rv = re.match(r'.*(?=\.)', fn).group()
}
endsnippet

snippet testcase6 "class XYZTest extends TestCase { ... }"
<?php

namespace `!p
relpath = os.path.relpath(path)
m = re.search(r'[A-Z].+(?=/)', relpath)
if m:
snip.rv = m.group().replace('/', '\\')
`;

use PHPUnit\Framework\TestCase;

/**
* @author `!v g:snips_author`
*/
class `!p
snip.rv = re.match(r'.*(?=\.)', fn).group()
` extends TestCase
{
public function test$1()
{
${0:${VISUAL}}
}
}
endsnippet

# :vim:ft=snippets:

0 comments on commit fd93894

Please sign in to comment.