Skip to content

Commit dd07f44

Browse files
Copilotswissspidy
andcommitted
Address PR feedback: fix test assertions and code alignment
Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
1 parent 537ddf8 commit dd07f44

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

features/config-add.feature

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,16 @@ Feature: Add a constant or variable to wp-config.php file
3333
Scenario: Add a raw constant to wp-config.php
3434
Given a WP install
3535

36-
When I run `wp config add WP_DEBUG true --raw`
36+
When I run `wp config add WP_CUSTOM_CONSTANT true --raw`
3737
Then STDOUT should be:
3838
"""
39-
Success: Added the constant 'WP_DEBUG' to the 'wp-config.php' file with the raw value 'true'.
39+
Success: Added the constant 'WP_CUSTOM_CONSTANT' to the 'wp-config.php' file with the raw value 'true'.
4040
"""
4141

42-
When I run `wp config list WP_DEBUG --strict --format=json`
42+
When I run `wp config list WP_CUSTOM_CONSTANT --strict --format=json`
4343
Then STDOUT should contain:
4444
"""
45-
{"name":"WP_DEBUG","value":true,"type":"constant"}
45+
{"name":"WP_CUSTOM_CONSTANT","value":true,"type":"constant"}
4646
"""
4747

4848
Scenario: Fail when trying to add an existing constant

features/config-update.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ Feature: Update or add a constant or variable in wp-config.php file
7878
When I run `wp config update WP_DEBUG true --raw`
7979
Then STDOUT should be:
8080
"""
81-
Success: Added the constant 'WP_DEBUG' to the 'wp-config.php' file with the raw value 'true'.
81+
Success: Updated the constant 'WP_DEBUG' in the 'wp-config.php' file with the raw value 'true'.
8282
"""
8383

8484
When I run `wp config list WP_DEBUG --strict --format=json`

src/Config_Command.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -853,7 +853,7 @@ public function add( $args, $assoc_args ) {
853853
WP_CLI::error( "Could not process the '{$wp_config_file_name}' transformation.\nReason: {$exception->getMessage()}" );
854854
}
855855

856-
$raw = $options['raw'] ? 'raw ' : '';
856+
$raw = $options['raw'] ? 'raw ' : '';
857857
$message = "Added the {$type} '{$name}' to the '{$wp_config_file_name}' file with the {$raw}value '{$value}'.";
858858

859859
WP_CLI::success( $message );

0 commit comments

Comments
 (0)