Skip to content

Commit

Permalink
fix: test suite space in name
Browse files Browse the repository at this point in the history
  • Loading branch information
elonmallin committed Dec 11, 2023
1 parent e257b27 commit 8f7de9b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/PhpunitCommand/PhpunitArgBuilder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export class PhpunitArgBuilder {
let args = [
...(this.configFile ? ["--configuration", this.configFile] : []),
...(this.color ? [`--colors=${this.color}`] : []),
...(this.suites.length > 0 ? ["--testsuite", this.suites.join(",")] : []),
...(this.suites.length > 0 ? ["--testsuite", `'${this.suites.join(",")}'`] : []),
...(this.filter ? ["--filter", `'${this.filter}'`] : []),
...(this.groups.length > 0 ? ["--group", this.groups.join(",")] : []),
...this.args,
Expand Down
2 changes: 1 addition & 1 deletion src/test/php-project/phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
failOnWarning="true"
colors="true">
<testsuites>
<testsuite name="Math">
<testsuite name="Math suite">
<directory>tests/Math</directory>
</testsuite>
<testsuite name="Science">
Expand Down
4 changes: 2 additions & 2 deletions src/test/suite/codelens.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,14 @@ suite("CodeLens Test Suite", () => {
assert.equal(codeLenses[0].command?.title, "Run test");
assert.match(
(codeLenses[0].command?.arguments?.[0] as PhpunitArgBuilder).build(),
/--testsuite Math/i,
/--testsuite 'Math suite'/i,
);

assert.equal(codeLenses[1].command?.command, "phpunit.Test");
assert.equal(codeLenses[1].command?.title, "Run test");
assert.match(
(codeLenses[1].command?.arguments?.[0] as PhpunitArgBuilder).build(),
/--testsuite Science/i,
/--testsuite 'Science'/i,
);

assert.equal(codeLenses[2].command?.command, "phpunit.Test");
Expand Down

0 comments on commit 8f7de9b

Please sign in to comment.