2024-01-12 20:57:18 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/*
|
|
|
|
* This files contains functions that are used in the tests, especially the bootstrap.php file.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns true if the current test run is a partial run.
|
|
|
|
* A partial run is a run that only runs a subset of the tests using the --filter, --testsuite, --group or --exclude-group options.
|
|
|
|
*/
|
|
|
|
function isPartialRun(): bool
|
|
|
|
{
|
|
|
|
foreach ($_SERVER['argv'] as $arg) {
|
2025-04-05 12:01:48 +00:00
|
|
|
if (str_starts_with((string) $arg, '--filter')) {
|
2024-01-12 20:57:18 +00:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2025-04-05 12:01:48 +00:00
|
|
|
if (str_starts_with((string) $arg, '--testsuite')) {
|
2024-01-12 20:57:18 +00:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2025-04-05 12:01:48 +00:00
|
|
|
if (str_starts_with((string) $arg, '--group')) {
|
2024-01-12 20:57:18 +00:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2025-04-05 12:01:48 +00:00
|
|
|
if (str_starts_with((string) $arg, '--exclude-group')) {
|
2024-01-12 20:57:18 +00:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return false;
|
|
|
|
}
|