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)
2020 {
2121 consoleOutput ()->info ('Applying password and encryption to zip... ' );
2222
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
2424 $ zipFile = new ZipFile ();
2525 $ zipFile ->addFile ($ path , 'backup.zip ' , ZipFile::METHOD_DEFLATED );
2626 $ zipFile ->setPassword (config ('backup-shield.password ' ), config ('backup-shield.encryption ' ));
2727 $ zipFile ->saveAsFile ($ path );
2828 $ zipFile ->close ();
2929
30- consoleOutput ()->info ('Applied password and encryption to zip. ' );
30+ consoleOutput ()->info ('Successfully applied password and encryption to zip. ' );
3131
3232 $ this ->path = $ path ;
3333 }
Original file line number Diff line number Diff line change @@ -87,7 +87,17 @@ public static function tearDownAfterClass()
8787 {
8888 // Delete config and test-files
8989 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+
91101 parent ::tearDownAfterClass ();
92102 }
93103}
You can’t perform that action at this time.
0 commit comments