Skip to content

Commit d34090a

Browse files
committed
Fix ambiguity by improving regex
Follow-up to #282
1 parent 77d4758 commit d34090a

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

features/behat-steps.feature

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,15 @@ Feature: Test that WP-CLI Behat steps work as expected
276276
Then STDOUT should not be empty
277277
And the return code should be 0
278278

279+
@require-wp
280+
Scenario: Test WP installation steps
281+
Given a WP 6.8 installation
282+
When I run `wp core version`
283+
Then STDOUT should contain:
284+
"""
285+
6.8
286+
"""
287+
279288
@require-wp
280289
Scenario: Test WP files and wp-config.php steps
281290
Given an empty directory
@@ -296,8 +305,6 @@ Feature: Test that WP-CLI Behat steps work as expected
296305
Then STDOUT should not be empty
297306
And the return code should be 0
298307

299-
300-
301308
@require-wp
302309
Scenario: Test version string comparison
303310
Given a WP installation
@@ -374,6 +381,12 @@ Feature: Test that WP-CLI Behat steps work as expected
374381
WP_CONTENT_DIR
375382
"""
376383

384+
@require-wp
385+
Scenario: Test WP multisite installation
386+
Given a WP multisite installation
387+
When I run `wp core is-installed`
388+
Then the return code should be 0
389+
377390
@require-wp
378391
Scenario: Test WP multisite subdirectory installation
379392
Given a WP multisite subdirectory installation

src/Context/GivenStepDefinitions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ public function given_a_database(): void {
399399
*
400400
* @access public
401401
*
402-
* @Given /^a WP( [^\s]+)? install(?:ation)?$/
402+
* @Given /^a WP( \d[^\s]+)? install(?:ation)?$/
403403
*
404404
* @param string $version Optional version number (may include leading space)
405405
*/

0 commit comments

Comments
 (0)