@@ -476,6 +476,57 @@ Feature: Have a config file
476476 {"bar":"burrito","apple":"apple"}
477477 """
478478
479+ Scenario : Config inheritance in nested folders
480+ Given an empty directory
481+ And a wp-cli.local.yml file:
482+ """
483+ @dev:
484+ ssh: vagrant@example.test/srv/www/example.com/current
485+ path: web/wp
486+ """
487+ And a site/wp-cli.yml file:
488+ """
489+ _:
490+ inherit: ../wp-cli.local.yml
491+ @otherdev:
492+ ssh: vagrant@otherexample.test/srv/www/otherexample.com/current
493+ """
494+ And a site/public/index.php file:
495+ """
496+ <?php
497+ """
498+
499+ When I run `wp cli alias list`
500+ Then STDOUT should contain:
501+ """
502+ @all: Run command against every registered alias.
503+ @dev:
504+ path: web/wp
505+ ssh: vagrant@example.test/srv/www/example.com/current
506+ """
507+
508+ When I run `cd site && wp cli alias list`
509+ Then STDOUT should contain:
510+ """
511+ @all: Run command against every registered alias.
512+ @dev:
513+ path: web/wp
514+ ssh: vagrant@example.test/srv/www/example.com/current
515+ @otherdev:
516+ ssh: vagrant@otherexample.test/srv/www/otherexample.com/current
517+ """
518+
519+ When I run `cd site/public && wp cli alias list`
520+ Then STDOUT should contain:
521+ """
522+ @all: Run command against every registered alias.
523+ @dev:
524+ path: web/wp
525+ ssh: vagrant@example.test/srv/www/example.com/current
526+ @otherdev:
527+ ssh: vagrant@otherexample.test/srv/www/otherexample.com/current
528+ """
529+
479530 @require-wp-3.9
480531 Scenario : WordPress installation with local dev DOMAIN_CURRENT_SITE
481532 Given a WP multisite installation
0 commit comments