mirror of
https://github.com/opdavies/build-configs.git
synced 2025-03-13 05:26:56 +00:00
Make the PHP test runner conifigurable
PHPUnit, Pest or Paratest.
This commit is contained in:
parent
e1dc284a61
commit
5f62b02d14
|
@ -1,6 +1,9 @@
|
||||||
drupal:
|
drupal:
|
||||||
docroot: web
|
docroot: web
|
||||||
|
|
||||||
|
php:
|
||||||
|
test_runner: phpunit
|
||||||
|
|
||||||
experimental:
|
experimental:
|
||||||
runStaticAnalysisOnTests: false
|
runStaticAnalysisOnTests: false
|
||||||
useNewDatabaseCredentials: true
|
useNewDatabaseCredentials: true
|
||||||
|
|
|
@ -240,6 +240,10 @@ final class ConfigDto
|
||||||
'phpunit' => new Assert\Optional(
|
'phpunit' => new Assert\Optional(
|
||||||
new Assert\IsFalse(),
|
new Assert\IsFalse(),
|
||||||
),
|
),
|
||||||
|
|
||||||
|
'test_runner' => new Assert\Optional(
|
||||||
|
new Assert\Choice(['phpunit', 'pest', 'paratest']),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
)]
|
)]
|
||||||
public array $php;
|
public array $php;
|
||||||
|
|
|
@ -111,9 +111,9 @@ function stop {
|
||||||
docker compose down
|
docker compose down
|
||||||
}
|
}
|
||||||
|
|
||||||
{% if not php.phpunit is same as false %}
|
{% if not php.phpunit is same as false and not php.test_runner is same as false %}
|
||||||
function test {
|
function test {
|
||||||
_exec php phpunit --colors=always "${@}"
|
_exec php {{ php.test_runner }} --colors=always "${@}"
|
||||||
}
|
}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue