Skip to content

Commit 95417fb

Browse files
authored
test: cover default PHPUnit recipe paths (#1833)
1 parent 65efc1c commit 95417fb

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

tests/runtime-services.test.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@ try {
3636
const builtRecipe = JSON.parse(await readFile(recipePath, "utf8")) as WorkspaceRecipe
3737
assert.ok(builtRecipe.workflow.steps[0].args?.includes("test-root=/home/example/bin/tests/core"))
3838
assert.ok(builtRecipe.workflow.steps[0].args?.includes("phpunit-xml=/home/example/bin/tests/core/phpunit.xml"))
39+
40+
await writeFile(optionsPath, JSON.stringify({ pluginSlug: "example" }))
41+
assert.equal(await runRecipeBuildCommand(["phpunit", "--options", optionsPath, "--output", recipePath]), 0)
42+
const defaultRecipe = JSON.parse(await readFile(recipePath, "utf8")) as WorkspaceRecipe
43+
assert.ok(defaultRecipe.workflow.steps[0].args?.includes("test-root=/wordpress/wp-content/plugins/example/tests"))
44+
assert.ok(defaultRecipe.workflow.steps[0].args?.includes("phpunit-xml=/wordpress/wp-content/plugins/example/phpunit.xml.dist"))
3945
} finally {
4046
await rm(builderDirectory, { recursive: true, force: true })
4147
}

0 commit comments

Comments
 (0)