Skip to content

Commit

Permalink
Merge pull request #8373 from kenjis/fix-make-test
Browse files Browse the repository at this point in the history
fix: make:test help and docs
  • Loading branch information
kenjis authored Dec 27, 2023
2 parents f4d2ede + db11c4d commit f34fe29
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 3 deletions.
5 changes: 2 additions & 3 deletions system/Commands/Generators/TestGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class TestGenerator extends BaseCommand
* @var array<string, string>
*/
protected $arguments = [
'name' => 'The command class name.',
'name' => 'The test class name.',
];

/**
Expand All @@ -66,8 +66,7 @@ class TestGenerator extends BaseCommand
* @var array<string, string>
*/
protected $options = [
'--namespace' => 'Set root namespace. Default: "APP_NAMESPACE".',
'--force' => 'Force overwrite existing file.',
'--force' => 'Force overwrite existing file.',
];

/**
Expand Down
3 changes: 3 additions & 0 deletions user_guide_src/source/changelogs/v4.5.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,8 @@ Enhancements
Commands
========

- Added ``spark make:test`` command to generate a skeleton test file. See
:ref:`cli-generators-make-test` for the details.
- Added ``spark config:check`` command to check Config values. See
:ref:`confirming-config-values` for the details.
- Added ``spark lang:find`` command to update translations keys. See :ref:`generating-translation-files-via-command` for the details.
Expand Down Expand Up @@ -350,6 +352,7 @@ Others
Message Changes
***************

- Added ``CLI.generator.className.test`` message.
- Added ``Validation.field_exists`` error message.

Changes
Expand Down
24 changes: 24 additions & 0 deletions user_guide_src/source/cli/cli_generators.rst
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,30 @@ Options:
* ``--suffix``: Append the component suffix to the generated class name.
* ``--force``: Set this flag to overwrite existing files on destination.


.. _cli-generators-make-test:

make:test
-----------

.. versionadded:: 4.5.0

Creates a new test file.

Usage:
======
::

make:test <name> [options]

Argument:
=========
* ``name``: The name of the test class. **[REQUIRED]**

Options:
========
* ``--force``: Set this flag to overwrite existing files on destination.

make:migration
--------------

Expand Down

0 comments on commit f34fe29

Please sign in to comment.