wp-cli / scaffold-command

Generates code for post types, taxonomies, blocks, plugins, child themes, etc.
MIT License
165 stars 87 forks source link

Scaffolding plugin tests manually loads wrong file #190

Closed markjaquith closed 7 months ago

markjaquith commented 5 years ago

Given a plugin: plugins/foo/bar.php, if you run wp scaffold plugin-tests foo, tests/bootstrap.php will generate this:

/**
 * Manually load the plugin being tested.
 */
function _manually_load_plugin() {
    require dirname( dirname( __FILE__ ) ) . '/foo.php';
}

Expected:

/**
 * Manually load the plugin being tested.
 */
function _manually_load_plugin() {
    require dirname( dirname( __FILE__ ) ) . '/bar.php';
}