File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -20,14 +20,14 @@ function __construct(string $path)
20
20
{
21
21
consoleOutput ()->info ('Applying password and encryption to zip... ' );
22
22
23
- // Create a new zip, add the zip from spatie/backup, encrypt and resave
23
+ // Create a new zip, add the zip from spatie/backup, encrypt and resave/overwrite
24
24
$ zipFile = new ZipFile ();
25
25
$ zipFile ->addFile ($ path , 'backup.zip ' , ZipFile::METHOD_DEFLATED );
26
26
$ zipFile ->setPassword (config ('backup-shield.password ' ), config ('backup-shield.encryption ' ));
27
27
$ zipFile ->saveAsFile ($ path );
28
28
$ zipFile ->close ();
29
29
30
- consoleOutput ()->info ('Applied password and encryption to zip. ' );
30
+ consoleOutput ()->info ('Successfully applied password and encryption to zip. ' );
31
31
32
32
$ this ->path = $ path ;
33
33
}
Original file line number Diff line number Diff line change @@ -87,7 +87,17 @@ public static function tearDownAfterClass()
87
87
{
88
88
// Delete config and test-files
89
89
unlink (__DIR__ . '/resources/processed.zip ' );
90
- unlink (__DIR__ . '/../vendor/orchestra/testbench-core/laravel/config/backup-shield.php ' );
90
+
91
+ $ configTestPath = __DIR__ . '/../vendor/orchestra/testbench-core/laravel/config/backup-shield.php ' ;
92
+ if (file_exists ($ configTestPath )) {
93
+ unlink (__DIR__ . '/../vendor/orchestra/testbench-core/laravel/config/backup-shield.php ' );
94
+ }
95
+
96
+ $ configTestPathAlt = __DIR__ . '/../vendor/orchestra/testbench-core/fixture/config/backup-shield.php ' ;
97
+ if (file_exists ($ configTestPathAlt )) {
98
+ unlink (__DIR__ . '/../vendor/orchestra/testbench-core/fixture/config/backup-shield.php ' );
99
+ }
100
+
91
101
parent ::tearDownAfterClass ();
92
102
}
93
103
}
You can’t perform that action at this time.
0 commit comments