Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/adamwathan/sublime-phpunit
Run individual unit test files directly from Sublime
https://github.com/adamwathan/sublime-phpunit
Last synced: 3 months ago
JSON representation
Run individual unit test files directly from Sublime
- Host: GitHub
- URL: https://github.com/adamwathan/sublime-phpunit
- Owner: adamwathan
- Created: 2014-02-21T05:20:36.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2018-07-06T20:20:38.000Z (over 6 years ago)
- Last Synced: 2024-04-10T08:38:05.219Z (7 months ago)
- Language: Python
- Size: 30.3 KB
- Stars: 278
- Watchers: 7
- Forks: 43
- Open Issues: 12
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
- awesome - adamwathan/sublime-phpunit - Run individual unit test files directly from Sublime (Python)
README
# Sublime PHPUnit
Convenient Sublime Text commands for running your PHPUnit tests. Scans up the directory tree to find the closest phpunit.xml file and runs phpunit from there. If it can't find one, it just runs phpunit from `/`.
## Installation
Installation is as simple as cloning the repository into your Sublime Text install's `Packages` folder:
```bash
git clone https://github.com/adamwathan/sublime-phpunit ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/sublime-phpunit
```## Available Commands & Example Keybindings
You can find the commands in the command palette under "Sublime PHPUnit", or map any of these commands to whatever shortcuts you want:
Here's the full list of commands:
```
run_phpunit_test
run_phpunit_tests_in_dir
run_single_phpunit_test
run_last_phpunit_test
run_all_phpunit_tests
````Here are some example keybindings:
```json
[
{ "keys": ["alt+t"], "command": "run_phpunit_test"},
{ "keys": ["super+alt+t"], "command": "run_single_phpunit_test"},
{ "keys": ["super+alt+l+t"], "command": "run_last_phpunit_test"},
{ "keys": ["super+shift+t"], "command": "run_phpunit_tests_in_dir"},
{ "keys": ["super+shift+ctrl+t"], "command": "run_all_phpunit_tests"},
]```
## Using iTerm2 instead of Terminal.app
By default, this package uses macOS's built-in Terminal.app. If you want to use iTerm2, you can do so changing the terminal in your settings:
```
{
"phpunit-sublime-terminal": "iTerm",
}
```## Using fish shell
If you use [fish shell](https://fishshell.com/), specify this in your settings:
```
{
"phpunit-sublime-shell": "fish"
}
```This will instruct Sublime PHPUnit to connect the commands using fish's `; and` instead of bash's `&&`.