2014-02-26 03:31:33 -05:00
|
|
|
# suggestion? report bugs?
|
2013-08-26 09:11:23 -04:00
|
|
|
# please go to https://github.com/chrisyue/vim-snippets/issues
|
2014-02-26 03:31:33 -05:00
|
|
|
priority -50
|
|
|
|
|
2013-08-26 09:11:23 -04:00
|
|
|
snippet test "phpunit test class" b
|
2014-02-26 03:31:33 -05:00
|
|
|
namespace `!p
|
2013-08-26 09:11:23 -04:00
|
|
|
abspath = os.path.abspath(path)
|
|
|
|
m = re.search(r'[A-Z].+(?=/)', abspath)
|
|
|
|
if m:
|
|
|
|
snip.rv = m.group().replace('/', '\\')
|
|
|
|
`;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @author `whoami`
|
|
|
|
*/
|
|
|
|
class `!p
|
|
|
|
snip.rv = re.match(r'.*(?=\.)', fn).group()
|
|
|
|
` extends \PHPUnit_Framework_TestCase
|
|
|
|
{
|
|
|
|
public function test${1}()
|
|
|
|
{
|
|
|
|
${2}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
endsnippet
|
|
|
|
|
|
|
|
snippet exp "phpunit expects" i
|
|
|
|
expects($this->${1:once}())
|
|
|
|
->method('${2}')
|
|
|
|
->with($this->equalTo(${3})${4})
|
|
|
|
->will($this->returnValue(${5}));
|
|
|
|
endsnippet
|