diff --git a/packages/framework/tests/Unit/DataCollectionUnitTest.php b/packages/framework/tests/Unit/DataCollectionUnitTest.php index 1ded27cc22c..016dd5adc24 100644 --- a/packages/framework/tests/Unit/DataCollectionUnitTest.php +++ b/packages/framework/tests/Unit/DataCollectionUnitTest.php @@ -116,6 +116,13 @@ protected static function findFiles(string $name, array|string $extensions): Col */ public static function mockFiles(array $files): void { + foreach ($files as $file => $contents) { + assert(is_string($file), 'File name must be a string.'); + assert(is_string($contents), 'File contents must be a string.'); + assert(str_contains($file, '/'), 'File must be in a directory.'); + assert(str_contains($file, '.'), 'File must have an extension.'); + } + static::$mockFiles = $files; }