diff --git a/phpunit.xml b/phpunit.xml new file mode 100644 index 0000000..9dacde5 --- /dev/null +++ b/phpunit.xml @@ -0,0 +1,15 @@ + + + + + tests/Unit + + + + + + \ No newline at end of file diff --git a/src/Treblle.php b/src/Treblle.php index 678b760..ece6062 100644 --- a/src/Treblle.php +++ b/src/Treblle.php @@ -149,7 +149,7 @@ public function onShutdown(): void $payload = '{}'; } - if (!\function_exists('pcntl_fork')) { + if (!\function_exists('pcntl_fork') || (\defined('ARE_TESTS_RUNNING') && ARE_TESTS_RUNNING)) { $this->collectData($payload); return;