phpunit-snippets
PHPUnit snippets for Sublime Text.
THIS PROJECT IS NO LONGER MAINTAINED!
I moved all my snippets to my custom sublimefiles.
Overview
Works best with PHP Grammar, PHP Completions, PHP Snippets, PHPUnit, and PHPUnit Completions.
Features
Snippets
Trigger | Description |
---|---|
phpunitxml |
PHPUnit: xml configuration declaration |
provide |
PHPUnit: data provider test |
setup |
PHPUnit: setup method declaration |
teardown |
PHPUnit: teardown method declaration |
test |
PHPUnit: test |
testbootstrap |
PHPUnit: bootstrap |
testcase |
PHPUnit: test case declaration |
testd |
PHPUnit: test with annotated @depends |
Key Bindings
OS X | Windows | Linux | Description |
---|---|---|---|
Ctrl+Space | Ctrl+Space | Alt+/ | Activate completions |
To enable tab-completions set "tab_completion": true
in Preferences > Settings - User
.
Installation
Manual installation
- Close Sublime Text.
- Download or clone this repository to a directory named
phpunit-snippets
in the Sublime Text Packages directory for your platform:- Sublime Text 3
- Linux:
git clone https://github.com/gerardroche/sublime-phpunit-snippets.git ~/.config/sublime-text-3/Packages/phpunit-snippets
- OS X:
git clone https://github.com/gerardroche/sublime-phpunit-snippets.git ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/phpunit-snippets
- Windows:
git clone https://github.com/gerardroche/sublime-phpunit-snippets.git %APPDATA%\Sublime/ Text/ 3/Packages/phpunit-snippets
- Linux:
- Sublime Text 2
- Linux:
git clone https://github.com/gerardroche/sublime-phpunit-snippets.git ~/.config/sublime-text-2/Packages/phpunit-snippets
- OS X:
git clone https://github.com/gerardroche/sublime-phpunit-snippets.git ~/Library/Application\ Support/Sublime\ Text\ 2/Packages/phpunit-snippets
- Windows:
git clone https://github.com/gerardroche/sublime-phpunit-snippets.git %APPDATA%\Sublime/ Text/ 2/Packages/phpunit-snippets
- Linux:
- Sublime Text 3
- Restart Sublime Text to complete installation. The features listed above should now be available.
Contributing
Your issue reports and pull requests are always welcome.
Changelog
See CHANGELOG.md.
License
Released under the BSD 3-Clause License.