File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -170,3 +170,24 @@ Feature: Check whether the wp-config.php file or the wp-custom-config.php file h
170170 """
171171 Error: Found both a constant and a variable 'SOME_NAME' in the 'wp-custom-config.php' file. Use --type=<type> to disambiguate.
172172 """
173+
174+ Scenario : Find variable after a concatenation assignment
175+ Given a WP install
176+ And a wp-config.php file:
177+ """
178+ $do_redirect = 'https://example.com' . $_SERVER['REQUEST_URI'];
179+ $table_prefix = 'wp_';
180+ define( 'DB_NAME', 'wp' );
181+ """
182+
183+ When I run `wp config has table_prefix --type=variable`
184+ Then STDOUT should be empty
185+ And the return code should be 0
186+
187+ When I run `wp config has DB_NAME --type=constant`
188+ Then STDOUT should be empty
189+ And the return code should be 0
190+
191+ When I run `wp config has do_redirect --type=variable`
192+ Then STDOUT should be empty
193+ And the return code should be 0
You can’t perform that action at this time.
0 commit comments