Skip to content

Adding slashes at the end of plugin name on 'plugin-tests' subcomand generates corrupted bootstrap.php #133

@enrico-sorcinelli

Description

@enrico-sorcinelli

Adding one or more slashes at the end of plugin name like for example:

%> wp-cli scaffold plugin-tests my-plugin/

runs right, but causes the creation of a corrupted bootstrap.php file that produces a PHP Fatal error on require() that file when launching tests.
(The usual message is like following: "PHP Fatal error: require(): Failed opening required '/path/to/my-plugin/.php' (include_path='.') in /path/to/my-plugin/tests/bootstrap.php on line 26.")

I'd like to send a PR in order to fix this for example by right trimming slashes to $slug before to send to mustache template.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions