1
0
mirror of https://github.com/php/pie.git synced 2026-03-23 23:12:17 +01:00

Expand feature descriptions for better coverage of new features

This commit is contained in:
James Titcumb
2025-11-05 17:06:02 +00:00
parent 66bf738a33
commit 73e06fd114
8 changed files with 77 additions and 2 deletions

View File

@@ -0,0 +1,7 @@
Feature: Extensions for a PHP project can be installed with PIE
# pie install php/sodium
Example: An extension normally bundled with PHP can be installed
Given I have libsodium on my system
When I install the sodium extension with PIE
Then the extension should have been installed and enabled

View File

@@ -1,9 +1,11 @@
Feature: Extensions can be installed with PIE
# pie download <ext>
Example: The latest version of an extension can be downloaded
When I run a command to download the latest version of an extension
Then the latest version should have been downloaded
# pie download <ext>:<version>
Scenario Outline: A version matching the requested constraint can be downloaded
When I run a command to download version "<constraint>" of an extension
Then version "<version>" should have been downloaded
@@ -13,11 +15,13 @@ Feature: Extensions can be installed with PIE
| 2.0.5 | 2.0.5 |
| ^2.0 | 2.0.5 |
# pie download <ext>:dev-main
@non-windows
Example: An in-development version can be downloaded on non-Windows systems
When I run a command to download version "dev-main" of an extension
Then version "dev-main" should have been downloaded
# pie build <ext>
Example: An extension can be built
When I run a command to build an extension
Then the extension should have been built
@@ -27,10 +31,17 @@ Feature: Extensions can be installed with PIE
When I run a command to build an extension
Then the extension should have been built
# pie build <ext> --with-some-options=foo
Example: An extension can be built with configure options
When I run a command to build an extension with configure options
Then the extension should have been built with options
Example: An extension can be installed
When I run a command to install an extension
# pie install <ext> --skip-enable-extension
Example: An extension can be installed without enabling
When I run a command to install an extension without enabling it
Then the extension should have been installed
# pie install <ext>
Example: An extension can be installed and enabled
When I run a command to install an extension
Then the extension should have been installed and enabled

View File

@@ -0,0 +1,7 @@
Feature: Extensions for a PHP project can be installed with PIE
# pie install
Example: PIE running in a PHP project suggests missing dependencies
Given I am in a PHP project that has missing extensions
When I run a command to install the extensions
Then I should see all the extensions are now installed

View File

@@ -0,0 +1,7 @@
Feature: A PIE extension can be installed with PIE
# pie install
Example: Running PIE in a PIE project will install that PIE extension
Given I am in a PIE project
When I run a command to install the extension
Then the extension should have been installed and enabled

View File

@@ -1,10 +1,12 @@
Feature: Package repositories can be managed with PIE
# pie repository:add ...
Example: A package repository can be added
Given no repositories have previously been added
When I add a package repository
Then I should see the package repository can be used by PIE
# pie repository:remove ...
Example: A package repository can be removed
Given I have previously added a package repository
When I remove the package repository

View File

@@ -0,0 +1,13 @@
Feature: Platform dependencies are checked when installing
# pie info <ext>
Example: Extension platform dependencies are listed as dependencies
Given I do not have libsodium on my system
When I display information about the sodium extension with PIE
Then the information should show that libsodium is a missing dependency
# pie install <ext>
Example: Extension platform dependencies will warn the extension is missing a dependency
Given I do not have libsodium on my system
When I install the sodium extension with PIE
Then the extension fails to install due to the missing library

View File

@@ -0,0 +1,27 @@
Feature: PIE can update itself and verify it is authentic
# pie self-update
Example: PIE can update itself
Given I have an old version of PIE
When I update PIE to the latest stable version
Then I should see I have been updated to the latest version
# pie self-verify
Example: PIE can verify its authenticity with gh
Given I have a pie.phar built on PHP's GitHub
And I have the gh cli command
When I verify my PIE installation
Then I should see it is verified
# pie self-verify
Example: PIE can verify its authenticity with openssl
Given I have a pie.phar built on PHP's GitHub
And I do not have the gh cli command
When I verify my PIE installation
Then I should see it is verified
# pie self-verify
Example: PIE will alert when its authenticity is not verified
Given I have a pie.phar built on a nasty hacker's machine
When I verify my PIE installation
Then I should see it has failed verification

View File

@@ -1,5 +1,6 @@
Feature: Extensions can be uninstalled with PIE
# pie uninstall <ext>
Example: An extension can be uninstalled
Given an extension was previously installed
When I run a command to uninstall an extension