diff --git a/src/Internal/TestLifecycle.php b/src/Internal/TestLifecycle.php index 7ee466c..37c0669 100644 --- a/src/Internal/TestLifecycle.php +++ b/src/Internal/TestLifecycle.php @@ -239,7 +239,7 @@ public function attachReports(): self if (!is_string($artifact)) { continue; } - $dataSource = @file_exists($artifact) && !is_file($artifact) + $dataSource = @file_exists($artifact) && is_file($artifact) ? DataSourceFactory::fromFile($artifact) : DataSourceFactory::fromString($artifact); $this