diff --git a/CHANGELOG.md b/CHANGELOG.md index e93ccb9..c6d66c3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ All notable changes are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles. +## 3.18.1 - Unreleased + +### Deprecated + +* The deprecated strategy `basic` should be replaced with `sublime`. + ## 3.18.0 - 2023-08-06 ### Added diff --git a/Preferences.sublime-settings b/Preferences.sublime-settings index a22a2b0..2bcc8c1 100644 --- a/Preferences.sublime-settings +++ b/Preferences.sublime-settings @@ -52,8 +52,15 @@ // Save all dirty buffers before running tests. "phpunit.save_all_on_run": true, - // Execution environment to run tests. Valid values: basic|iterm|kitty - "phpunit.strategy": "basic", + // Choose the desired execution environment for running tests. + // Options include: + // - sublime + // - iterm + // - kitty + // - xterm + // - cmd + // - powershell + "phpunit.strategy": "sublime", // Enable SSH. "phpunit.ssh": false, diff --git a/README.md b/README.md index 2f845e6..5fc56cc 100644 --- a/README.md +++ b/README.md @@ -160,7 +160,7 @@ Command Palette → Preferences: PHPUnit Settings | Strategy | Identifier | Description | :------: | :--------: | :---------- -| **Basic** (default) | `basic` | Sends test commands to Sublime Text exec output panel. +| **Sublime** (default) | `sublime` | Sends test commands to Sublime Text exec output panel. | **iTerm2.app** | `iterm` | Sends test commands to `iTerm2 >= 2.9` (useful in MacVim GUI). | **[Kitty]** | `kitty` | Sends test commands to Kitty terminal. | **[xterm]** | `xterm` | Sends test commands to xterm terminal. :new: @@ -180,7 +180,7 @@ Command Palette → Preferences: PHPUnit Settings | `phpunit.on_post_save` | `list` | `[]` | Auto commands when views are saved.
Example: `["phpunit_test_file"]` | `phpunit.debug` | `boolean` | `false` | Prints test runner debug information. | `phpunit.prepend_cmd` | `list` | `[]` | Prepends test runner command. -| `phpunit.strategy` | `string` | `basic` | Execution environment to run tests. +| `phpunit.strategy` | `string` | `sublime` | Execution environment to run tests. | `phpunit.font_size` | `integer` | Editor default. | Font size of PHPUnit output. | `phpunit.composer` | `boolean` | `true` | Use Composer installed executables. | `phpunit.artisan` | `boolean` | `false` | Use Artisan to run tests. diff --git a/lib/utils.py b/lib/utils.py index 91539bd..662818c 100644 --- a/lib/utils.py +++ b/lib/utils.py @@ -661,7 +661,7 @@ def get_phpunit_options(view, options=None) -> dict: # See https://github.com/gerardroche/sublime-phpunit/issues/103 # See https://github.com/gerardroche/sublime-phpunit/issues/102 # See https://github.com/laravel/framework/issues/46759 - if get_setting(view, 'strategy') == 'basic': + if get_setting(view, 'strategy') in ('sublime', 'basic'): if get_setting(view, 'pest') or get_setting(view, 'artisan'): options['colors=never'] = True diff --git a/tests/lib/utils/test_get_phpunit_options.py b/tests/lib/utils/test_get_phpunit_options.py index dea9f67..e0d2d9e 100644 --- a/tests/lib/utils/test_get_phpunit_options.py +++ b/tests/lib/utils/test_get_phpunit_options.py @@ -47,10 +47,10 @@ def testget_phpunit_options_has_session(self): self.assertEquals({'no-coverage': True, 'no-progress': False}, get_phpunit_options(self.view)) def test_artisan_should_never_enable_colors(self): - self.view.settings().set('phpunit.strategy', 'basic') + self.view.settings().set('phpunit.strategy', 'sublime') self.view.settings().set('phpunit.artisan', True) self.assertEquals({'colors=never': True}, get_phpunit_options(self.view)) - self.view.settings().set('phpunit.strategy', 'basic') + self.view.settings().set('phpunit.strategy', 'sublime') def test_pest_and_artisan_only_disable_colors_for_the_basic_strategy(self): self.view.settings().set('phpunit.strategy', 'iterm')