All notable changes are documented in this file using the Keep a CHANGELOG principles.
- Fix path to the osx_iterm executable #130 @devinfd
- Fix ''NoneType' object is not iterable'
PHPUnit: Test Switch
("switchables") doesn't work in some cases
- Tmux strategy
phpunit.tmux_clear_scrollback
setting is not working correctly
- Tmux strategy - Runs test in a tmux pane #119
- Syntax fixes
- Fix debug mode should be disabled by default
- Fix result output footer edge-cases
- The deprecated strategy
basic
should be replaced withsublime
.
- #126: New "powershell" strategy to run tests in the PowerShell command-line shell (Windows)
- #92: New "cmd" strategy to run tests in the cmd.exe command-line (Windows)
- #125: New "Toggle Run Test On Save" command palette
- #92: Allow "external" strategy for custom strategies using
prepend_cmd
- The deprecated on-post-save "run_test_file" event, use on-post-save "phpunit_test_file" event instead.
- #99: New support for running tests via Docker
- #118: New support for running tests on a remote server via SSH
- #120: New strategy:
xterm
- Sends test commands to xterm terminal. - New Command: Changelog
- New Command: "PHPUnit: Toggle --cache-result" - Write test results to cache file
- New Command: "PHPUnit: Toggle --do-not-cache-result" - Do not write test results to cache file
- New Command: "PHPUnit: Toggle --globals-backup" - Backup and restore
$GLOBALS
for each test - New Command: "PHPUnit: Toggle --no-logging" - Ignore logging configured in the XML configuration file
- New Command: "PHPUnit: Toggle --path-coverage" - Report path coverage in addition to line coverage
- New Command: "PHPUnit: Toggle --process-isolation" - Run each test in a separate PHP process
- New Command: "PHPUnit: Toggle --static-backup" - Backup and restore static properties for each test
- New Command: "PHPUnit: Toggle --teamcity" - Replace default progress and result output with TeamCity format
- Session options, e.g. toggled options, should be cleared on restart
- Session options loading edge-case issues
- Toggle options edge-case issues
phpunit.debug
should be documented in preferences- Disable white-space characters in results output #117
- Disable indent guides in results output #116
- New Command: "PHPUnit: Toggle --display-incomplete" - Display details for incomplete tests
- New Command: "PHPUnit: Toggle --display-skipped" - Display details for skipped tests
- New Command: "PHPUnit: Toggle --display-deprecations" - Display details for deprecations triggered by tests
- New Command: "PHPUnit: Toggle --display-errors" - Display details for errors triggered by tests
- New Command: "PHPUnit: Toggle --display-notices" - Display details for notices triggered by tests
- New Command: "PHPUnit: Toggle --display-warnings" - Display details for warnings triggered by tests
- New Command: "PHPUnit: Toggle --fail-on-skipped" - Signal failure using shell exit code when a test was skipped
- New Command: "PHPUnit: Toggle --fail-on-notice" - Signal failure using shell exit code when a notice was triggered
- New Command: "PHPUnit: Toggle --fail-on-incomplete" - Signal failure using shell exit code when a test was marked incomplete
- New Command: "PHPUnit: Toggle --fail-on-deprecation" - Signal failure using shell exit code when a deprecation was triggered
- New Command: "PHPUnit: Toggle --no-output" - Disable all output
- New Command: "PHPUnit: Toggle --no-progress" - Disable output of test execution progress
- New Command: "PHPUnit: Toggle --no-results" - Disable output of test results
- New Command: "PHPUnit: Toggle --order-by=depends" - Run tests in order: depends
- New Command: "PHPUnit: Toggle --order-by=size" - Run tests in order: size
- New Command: "PHPUnit: Toggle --stop-on-deprecation" - Stop after first test that triggered a deprecation
- New Command: "PHPUnit: Toggle --stop-on-notice" - Stop after first test that triggered a notice
- Renamed command captions "PHPUnit: Toggle Option ..." → "PHPUnit: Toggle ..."
- Fixed various tests results colour output issues (PHPUnit, Pest)
- Fixed
--orderby=
toggle commands doesn't work - Fixed command captions "PHPUnit: Set Option ..." → "PHPUnit: Toggle ..."
- #83: Autocommand test file on save renamed
phpunit_test_file
torun_test_file
- #115: Test nearest, tests whole pest file
- #114: Test nearest and file is missing for Pest
- #69: Support for PHPUnit output font size:
phpunit.font_size
- #111: Support for ParaTest
- #110: View settings side-by-side
- #69: Renamed setting
phpunit.text_ui_result_font_size
tophpunit.font_size
- #113: Color is missing in strategies like Kitty for Artisan and Pest test runners
- #112: Don't show build panel when using strategies like Kitty
- #103: Build output syntax
- #103: Artisan and Pest color output
- #103: Only use the Artisan runner if enabled and it exists
- #102: Only use the Pest runner if enabled and it exists
- #102: Support for Artisan:
artisan test
- #103: Support for Pest
- #109: env and cmd information in now only displayed in debug mode
- #108: Allow
phpunit.executable
to be set aslist
- #107: Support PHPUnit 10 dist file name
phpunit.dist.xml
- #105:
phpunit.prepend_cmd
option
- #105: Support for syntax updates in build
>=
4134
- #101: Remaining arguments are lost when running on iterm (OSX)
- Switching misses matching switchable and displays overlay
- Switching should go straight to file when only one result
- #98: Add
phpunit.executable
setting to set custom phpunit path
.php-version
files should accept minor version formats e.g. 7.4
- Support for ST4
- #83: Auto-run tests on save
- #29: New Command: PHPUnit: Set Option --order-by=default
- #29: New Command: PHPUnit: Set Option --order-by=defects
- #29: New Command: PHPUnit: Set Option --order-by=duration
- #29: New Command: PHPUnit: Set Option --order-by=no-depends
- #29: New Command: PHPUnit: Set Option --order-by=random
- #29: New Command: PHPUnit: Set Option --order-by=reverse
- New command: PHPUnit: Toggle Option --stop-on-warning
- New command: PHPUnit: Toggle Option --stop-on-defect
- New command: PHPUnit: Toggle Option --fail-on-warning
- New command: PHPUnit: Toggle Option --fail-on-risky
- New command: PHPUnit: Toggle Option --disallow-resource-usage
- New command: PHPUnit: Toggle Option --dont-report-useless-tests
- New command: PHPUnit: Toggle Option --reverse-list
- New command: PHPUnit: Toggle Option --disable-coverage-ignore
- Various trivial issues
- #89: "Test Last" is broken
- Minor fixes
- #9: Use goto anything when more than one possible switchable
- Tests results panel should not show rulers
-
Renamed plugin from "phpunitkit" to "PHPUnitKit"
If you manually installed the package then you will need to rename the folder where you installed it from "phpunitkit" to "PHPUnitKit".
- Color schemes (color schemes are auto generated based on the active color scheme)
- Command
phpunit_switch_file
, usephpunit_test_switch
instead - Command
phpunit_open_code_coverage
, usephpunit_test_coverage
instead
- #78: Add support for PHPUnit Pretty Result Printer
- #76: Testing nearest doesn't always work
- #76: Testing nearest doesn't always work
- #75: Test results colors don't work
- Support for new Sublime Text color scheme format
- #70: Tests results don't have colors anymore
- #69: Can I adjust the font size of the test result panel
- Improved color scheme support for test results
:TestSwitch
now positions cursor at the row of the class definition
-
The default key bindings have been removed, instead add your preferred key bindings:
Menu → Preferences → Key Bindings
[ { "keys": ["ctrl+shift+a"], "command": "phpunit_test_suite" }, { "keys": ["ctrl+shift+f"], "command": "phpunit_test_file" }, { "keys": ["ctrl+shift+n"], "command": "phpunit_test_nearest" }, { "keys": ["ctrl+shift+l"], "command": "phpunit_test_last" }, { "keys": ["ctrl+shift+v"], "command": "phpunit_test_visit" }, { "keys": ["ctrl+shift+s"], "command": "phpunit_test_switch" }, { "keys": ["ctrl+shift+c"], "command": "phpunit_test_cancel" }, { "keys": ["ctrl+shift+r"], "command": "phpunit_test_results" }, ]
The following key bindings remain the same:
Key Description F4
Jump to Next Failure Shift+F4
Jump to Previous Failure
- #66: PHPUnit: 'NoneType' object has no attribute 'items'
- TypeError: object of type 'NoneType' has no len()
- #38: Command "PHPUnit: Test Visit" (phpunit_test_visit) Open the last run test in the current window (useful when you're trying to make a test pass, and you dive deep into application code and close your test buffer to make more space, and once you've made it pass you want to go back to the test file to write more tests)
- Command "phpunit_test_cancel" for cancelling tests
- Command "phpunit_test_results" for opening the test results panel
- Renamed command "PHPUnit: Cancel Test" to "PHPUnit: Test Cancel"
- Renamed command "PHPUnit: Show Results" to "PHPUnit: Test Results"
- Renamed command "PHPUnit: Open Code Coverage" to "PHPUnit: Test Coverage"
- Renamed command "PHPUnit: Switch File" to "PHPUnit: Test Switch"
- The command "phpunit_open_code_coverage" is deprecated and will be removed in v3.0.0; use "phpunit_test_coverage" instead
- The command "phpunit_switch_file" is deprecated and will be removed in v3.0.0; use "phpunit_test_switch" instead
- New syntax definition format for test results panel
- Test File command will now also run the test case for current file
- Colour schemes are deprecated and will be removed in v3.0.0
- All status messages should be prefixed with "PHPUnit: "
- No status messages in some edge cases
- #63: Switches to wrong test
- #59: Error when trying to run PHPUnit with a PHP executable (Windows)
- Error when trying to run a global install of PHPUnit with a PHP executable
- Errors when some paths contained characters like spaces
- Environment variables now work in path settings like "phpunit.php_executable" and "phpunit.php_versions_path"
- Project PHP version file (.php-version) version number not working for some version numbers
- Jump to next/previous error didn't work in some cases where file paths contained characters like spaces
- Running tests now terminates any currently running tests before running tests
- .php-version file version is no longer overridden by the default executable 'phpunit.php_executable'
- #58: Error when ~/.phpenv/versions path doesn't exist
- #56: Support for .php-version file to specify PHP version to use for running PHPUnit
- #55: Use different PHP executable
- #53: Vi keymaps are now enabled by default
- #52: Test File command
-
#42: Commands
Old name new name Run All Tests Test Suite Run Last Test Test Last Run Single Test Nearest Switch Test Case / Class Under Test Switch File Open HTML Code Coverage in Browser open Code Coverage Cancel Test Run Cancel Test Show Test Results Show Results -
#54: Vim keymaps
Old keymap New keymap Description ,t
,a
Test All ,r
,t
Test Single ,e
,l
Test Last -
settings
Old setting new setting phpunit.keymaps.vi
phpunit.vi_keymaps
- #57: Find next / previous failure keymaps (Windows)
- Open settings command file path
- Minor refactoring
- Minor fixes
- #39: Command Palette Command-Line Option toggles
- Deprecated #41: The
phpunit.vi_keymaps
configuration setting. Usephpunit.keymaps.vi
instead.
- #46: (Windows) Cannot run single test from class under test
- #40: Cannot specify short Command-Line Options
- #43: (Windows) Cannot run Composer installed PHPUnit
- README
- README
- README
- README
- plugin name from "php_phpunit" to "phpunitkit". The plugin was renamed because the last name was rejected by the Package Control channel.
- If you previously installed manually then remove the installation and install via Package Control. Search for phpunitkit.
- If you prefer to keep your manual installation then rename or move your installation to "phpunitkit".
- #35: Cannot run "Run Single Test" with the latest build of Sublime Text (build 3114)
- Now available on Package Control
- Renamed package from "phpunit" to "php_phpunit". This was needed in order to provide the plugin via Package Control. If you are having issues then either remove your existing plugin installation and install via Package Control, making sure to install the plugin by me, PHP PHPUnit (gerardroche), or rename your existing installation to "phpunit".
- #34: Option to disable composer support (phpunit.composer). Defaults to true.
- switch file command caption is now "PHPUnit: Switch Test Case / Class Under Test"
- CHANGELOG link to package settings menu
- Toggle No Coverage "--no-coverage" command
- "phpunit.options" setting to allow configuring a default list of options for PHPUnit to use
- incorrect file path to settings when opening from the command palette
- "phpunit.development" setting to enable/disable plugin development utilities
-
settings are no longer loaded from a plugin specific settings file i.e. phpunit.sublime-settings
There is, in my opinion, a bad practice of each and every plugin having its own settings file. This plugin no longer does this. All plugin settings are prefixed with the name of the plugin followed by a period i.e. "phpunit.".
Settings are loaded in this order:
- Project Specific
Example: Menu → Project → Edit Project
{ "settings": { "phpunit.save_all_on_run": true } }
- User
Example: Menu → Preferences → Settings - User
{ "phpunit.save_all_on_run": true }
-
"save_all_on_run" now only save files that exist on disk and have dirty buffers
The reason for this change:
When saving a file that doesn't exist on disk Sublime Text prompts with a "Save file" dialog, meanwhile the tests would run in the background anyways. We could prevent the tests from running until the user finishes handling the dialogs. If there is a desire for this please open an issue.
-
renamed setting "phpunit.enable_keymaps" to "phpunit.keymaps"
-
renamed setting "phpunit.enable_vi_keymaps" to "phpunit.keymaps"
-
To enable vi keymaps both "phpunit.keymaps" and "phpunit.vi_keymaps" need to be set to true, previously only the vi_keymaps needed to be set to true
- "Open HTML Code Coverage in Browser" command #23
- Switch and put class and test-case side-by-side #8
- Configurable color schemes #7
- Colour scheme "Packages/phpunit/color-schemes/monokai-extended-seti.hidden-tmTheme" #21
- Colour scheme "Packages/phpunit/color-schemes/solarized-dark.hidden-tmTheme" #21
- Command palette captions are now capitalised
- Goto next/last failure now matches all files/line-numbers in stack traces
- License link to package settings menu
- Several deprecated behaviours
- "PHPUnit: Cancel Test Run" to command palette
- ST3 Requirements check. Now raises a runtime exception if trying to load in < Sublime Text 3
- "PHPUnit.." to "Tools" main menu #15 #16
- "PHPUnit: Show Test Results" command
- "Open "Preferences: PHPunit Settings - Default" command
- "Open "Preferences: PHPunit Settings - User" command
- Running the last test command is now saved per window #19
- Per-project settings are now accessed via prefix "phpunit." in project definition settings. The old behaviour is deprecated and will be removed before the 1.0.0 beta releases.
- "phpunit" command #31
- Keymaps now display the default
ctrl+...
keymaps in command palette. Previously the Vintage/Vintageous keymaps were displayed. - error when there is no active window and/or view
- test results not displaying colour when there are risky tests
- option to disable the default keymaps. To disable the keymaps set
"phpunit.enable_keymaps": false
the User Settings. Access this file fromPreferences → Settings - User
menu item. #30
- Can now run multiple test methods using a multiple selection #5
- command palette toggle - report test progress TestDox format #24 #2
- command palette toggle - report test progress TAP format #24 #28
- Switching class-under-test/test-case now splits window into two views with both side-by-side if the current window only has one group.
- Vintage/Vintageous keymaps can now be enabled in the preferences. They are disabled by default. To enable set
"phpunit.enable_vi_keymaps": true
in the User Settings. Access this file fromPreferences → Settings - User
menu item.
- Can't switch classes beginning with an underscore #22
- Running single test runs all tests with the same prefix #25
- Some minor test result progress syntax highlighting bugs
- Composer installed PHPUnit support #13
- Saving all files on run can now be disabled. It can also be set on a per-project basis #12
- Command Palette commands #17
- Package Settings menu "Preferences → Package Settings → PHPUnit" #14
- Example Vintage/Vintageous keymaps in the default key bindings: "Preferences → Package Settings → PHPUnit → Key Bindings - Default" #10
- Debug messages are now disabled by default. To enable debug messages set an environment variable to a non-blank value:
SUBLIME_PHPUNIT_DEBUG=yes
. To disable debug message set the variable to a blank value:SUBLIME_PHPUNI_DEBUG=
. For example, on Linux Sublime Text can be opened at the Terminal with an exported environment variable:export SUBLIME_PHPUNIT_DEBUG=yes; ~/sublime_text_3/sublime_text
. #6 - The last test run is now saved in memory for the current session, previously it was save to a file. #11
- Many refactorings including test runner commands are now Window commands, previously they were Text commands. There is no need for these commands to be instantiated for every view.
- Test result progress highlighting was not displayed properly
- Test result failures red background no longer matches trailing whitespace, previously the red background stretched the full width of the screen.
- Initial import; PHPUnit support