@@ -12,47 +12,48 @@ function createDirectory(string $path): void
1212function createFile (string $ filePath ): void
1313{
1414 $ content = "<?php \n\ndeclare(strict_types=1); \n" ;
15+
1516 if (!file_exists ($ filePath )) {
1617 file_put_contents ($ filePath , $ content );
1718 }
1819}
1920
20- $ baseDir = __DIR__ . '/src ' ;
21+ $ baseDir = __DIR__ . '/tests ' ;
2122
2223// Directories and their respective files
2324$ structure = [
24- 'AbstractException .php ' ,
25- 'AbstractErrorMessage .php ' ,
26- 'Contract/ErrorMessage .php ' ,
27- 'Contract/Throwable .php ' ,
28- 'CommonErrorMessages .php ' ,
29- 'Auth/AuthenticationException .php ' ,
30- 'Auth/AuthorizationException .php ' ,
31- 'Validation/ValidationException .php ' ,
32- 'Validation/RuleViolationException .php ' ,
33- 'File/FileException .php ' ,
34- 'Input/InputException .php ' ,
35- 'Runtime/RuntimeException .php ' ,
36- 'System/SystemException .php ' ,
37- 'Security/SecurityException .php ' ,
38- 'Security/EncryptionException .php ' ,
39- 'Config/ConfigurationException .php ' ,
40- 'Network/NetworkException .php ' ,
41- 'Network/HttpException .php ' ,
42- 'Database/DatabaseException .php ' ,
43- 'Cache/CacheException .php ' ,
44- 'ExternalService/ExternalServiceException .php ' ,
45- 'Localization/LocalizationException .php ' ,
46- 'Event/EventException .php ' ,
47- 'Middleware/MiddlewareException .php ' ,
48- 'Queue/QueueException .php ' ,
49- 'Routing/RoutingException .php ' ,
50- 'Template/TemplateException .php ' ,
51- 'Session/SessionException .php ' ,
52- 'Container/ContainerException .php ' ,
25+ 'AbstractExceptionTest .php ' ,
26+ 'AbstractErrorMessageTest .php ' ,
27+ 'Contract/ErrorMessageTest .php ' ,
28+ 'Contract/ThrowableTest .php ' ,
29+ 'CommonErrorMessagesTest .php ' ,
30+ 'Auth/AuthenticationExceptionTest .php ' ,
31+ 'Auth/AuthorizationExceptionTest .php ' ,
32+ 'Validation/ValidationExceptionTest .php ' ,
33+ 'Validation/RuleViolationExceptionTest .php ' ,
34+ 'File/FileExceptionTest .php ' ,
35+ 'Input/InputExceptionTest .php ' ,
36+ 'Runtime/RuntimeExceptionTest .php ' ,
37+ 'System/SystemExceptionTest .php ' ,
38+ 'Security/SecurityExceptionTest .php ' ,
39+ 'Security/EncryptionExceptionTest .php ' ,
40+ 'Config/ConfigurationExceptionTest .php ' ,
41+ 'Network/NetworkExceptionTest .php ' ,
42+ 'Network/HttpExceptionTest .php ' ,
43+ 'Database/DatabaseExceptionTest .php ' ,
44+ 'Cache/CacheExceptionTest .php ' ,
45+ 'ExternalService/ExternalServiceExceptionTest .php ' ,
46+ 'Localization/LocalizationExceptionTest .php ' ,
47+ 'Event/EventExceptionTest .php ' ,
48+ 'Middleware/MiddlewareExceptionTest .php ' ,
49+ 'Queue/QueueExceptionTest .php ' ,
50+ 'Routing/RoutingExceptionTest .php ' ,
51+ 'Template/TemplateExceptionTest .php ' ,
52+ 'Session/SessionExceptionTest .php ' ,
53+ 'Container/ContainerExceptionTest .php ' ,
5354];
5455
55- // Create directories and files
56+ // Create directories and files for tests
5657foreach ($ structure as $ filePath ) {
5758 $ fullPath = $ baseDir . '/ ' . $ filePath ;
5859 $ directory = dirname ($ fullPath );
@@ -64,4 +65,4 @@ function createFile(string $filePath): void
6465 createFile ($ fullPath );
6566}
6667
67- echo "Directories and files created successfully! \n" ;
68+ echo "Test directories and files created successfully! \n" ;
0 commit comments