29 lines
607 B
Text
29 lines
607 B
Text
global !p
|
|
from mbutils import get_namespace
|
|
import os
|
|
|
|
def full_path(filename):
|
|
cwd = os.getcwd()
|
|
filepath = os.path.join(cwd, filename)
|
|
|
|
return os.path.dirname(filepath)
|
|
endglobal
|
|
|
|
snippet utest
|
|
<?php
|
|
/**
|
|
* @copyright Copyright 2016 ${1:Redbox Digital}
|
|
*/
|
|
|
|
namespace ${2:`!p snip.rv = get_namespace(full_path(path))`};
|
|
|
|
${3:// Use...}
|
|
|
|
class ${4:`!p snip.rv = snip.basename`} extends ${6:\\PHPUnit_Framework_TestCase}${7: implements ${8:SomeInterface, OtherInterface}}
|
|
\{
|
|
public function test${9:ThatYouAreInFactNotAnIdiot}()
|
|
\{
|
|
${0:// Implementation...}
|
|
\}
|
|
\}
|
|
endsnippet
|