Last active
April 9, 2018 13:05
-
-
Save mwidmann/18262f0ee86d6e58194643151a41ae71 to your computer and use it in GitHub Desktop.
Custom php snippets for Visual Studio Code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"PHPUnit Testcase": { | |
"prefix": "testcase", | |
"body": [ | |
"", | |
"use Illuminate\\Foundation\\Testing\\WithoutMiddleware;", | |
"use Illuminate\\Foundation\\Testing\\DatabaseMigrations;", | |
"use Illuminate\\Foundation\\Testing\\DatabaseTransactions;", | |
"", | |
"class ${TM_FILENAME_BASE} extends TestCase", | |
"{", | |
"\t$0", | |
"}" | |
], | |
"description": "TestCase" | |
}, | |
"PHPUnit Test Function": { | |
"prefix": "testfunc", | |
"body": [ | |
"/** @test */", | |
"function ${1:the_one_where}()", | |
"{", | |
"\t$0", | |
"}" | |
], | |
"description": "create a test function" | |
}, | |
"TEE PHPUnit Testcase": { | |
"prefix": "tee-testcase", | |
"body": [ | |
"", | |
"namespace Tests\\\\${TM_DIRECTORY/(.*)\\/(.+)$/$2/};", | |
"", | |
"use Tests\\TestCase;", | |
"use Illuminate\\Foundation\\Testing\\DatabaseMigrations;", | |
"use Illuminate\\Foundation\\Testing\\DatabaseTransactions;", | |
"", | |
"class ${TM_FILENAME_BASE} extends TestCase", | |
"{", | |
"\t$0", | |
"}" | |
], | |
"description": "create a Testcase for PHPUnit Tests in TEE Projects" | |
}, | |
"Class Template": { | |
"prefix": "cc", | |
"body": [ | |
"", | |
"namespace ${1:Russmedia\\\\Newspaper\\\\}${TM_DIRECTORY/^(.*)([\\\\|\\/]src[\\\\|\\/])(.*)$/$3/}", | |
"", | |
"class ${TM_FILENAME_BASE}", | |
"{", | |
"\t$0", | |
"}" | |
], | |
"description": "create a new Class, add Namespace automatically" | |
}, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment