1
0
Fork 0
mirror of synced 2024-11-26 10:45:35 -05:00
ultimate-vim/sources_non_forked/vim-snippets/UltiSnips/php-phpspec.snippets

39 lines
550 B
Text
Raw Normal View History

2016-05-14 07:57:54 -04:00
# Snippets for phpspec
priority -50
snippet spec "phpspec class" b
<?php
namespace `!p
relpath = os.path.relpath(path)
m = re.search(r'[A-Z].+(?=/)', relpath)
if m:
snip.rv = m.group().replace('/', '\\')
`;
use PhpSpec\ObjectBehavior;
use Prophecy\Argument;
/**
* @author `!v g:snips_author`
*/
class `!p
snip.rv = re.match(r'.*(?=\.)', fn).group()
` extends ObjectBehavior
{
public function it${1:_does_something}()
{
$0
}
}
endsnippet
snippet it "phpspec function it..." b
public function it${1:_does_something}()
{
$0
}
endsnippet