File tree Expand file tree Collapse file tree 2 files changed +38
-0
lines changed Expand file tree Collapse file tree 2 files changed +38
-0
lines changed Original file line number Diff line number Diff line change @@ -92,6 +92,14 @@ if (${1}) {
9292}
9393endsnippet
9494
95+ snippet ife " php ife" !b
96+ if (${1} ) {
97+ ${2}
98+ } else {
99+
100+ }
101+ endsnippet
102+
95103snippet /** " php comment block" b
96104/**
97105 * @${1}
Original file line number Diff line number Diff line change 1+ # sugguestion? report bugs?
2+ # please go to https://github.com/chrisyue/vim-snippets/issues
3+ snippet test " phpunit test class" b
4+ namespace `!p
5+ abspath = os.path.abspath(path)
6+ m = re.search(r ' [A-Z ]. + (?= /) ' , abspath)
7+ if m:
8+ snip.rv = m.group().replace(' /' , ' \\ ' )
9+ ` ;
10+
11+ /**
12+ * @author `whoami `
13+ */
14+ class `!p
15+ snip.rv = re.match(r ' . * (?= \. ) ' , fn).group()
16+ ` extends \P HPUnit_Framework_TestCase
17+ {
18+ public function test${1} ()
19+ {
20+ ${2}
21+ }
22+ }
23+ endsnippet
24+
25+ snippet exp " phpunit expects" i
26+ expects($this->${1: once } ())
27+ ->method('${2} ')
28+ ->with($this->equalTo(${3} )${4} )
29+ ->will($this->returnValue(${5} ));
30+ endsnippet
You can’t perform that action at this time.
0 commit comments