File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,13 @@ protected function setUp(): void
2626 $ this ->setUpGlobalMiddleware ();
2727 }
2828
29+ protected function tearDown (): void
30+ {
31+ parent ::tearDown ();
32+
33+ $ this ->deleteDirectory ($ this ->getTempDirectory ());
34+ }
35+
2936 protected function initializeDirectory ($ directory ): void
3037 {
3138 if (File::isDirectory ($ directory )) {
@@ -35,6 +42,13 @@ protected function initializeDirectory($directory): void
3542 File::makeDirectory ($ directory );
3643 }
3744
45+ protected function deleteDirectory ($ directory ): void
46+ {
47+ if (File::isDirectory ($ directory )) {
48+ File::deleteDirectory ($ directory );
49+ }
50+ }
51+
3852 protected function getTempDirectory ($ suffix = '' ): string
3953 {
4054 return __DIR__ .'/temp ' .($ suffix == '' ? '' : $ this ->uri .$ suffix );
You can’t perform that action at this time.
0 commit comments