]> BookStack Code Mirror - system-cli/commitdiff
Updated backup test to use backups path now in release
authorDan Brown <redacted>
Sun, 7 May 2023 12:26:06 +0000 (13:26 +0100)
committerDan Brown <redacted>
Sun, 7 May 2023 12:26:06 +0000 (13:26 +0100)
tests/Commands/BackupCommandTest.php

index 2d23e9c7ecb6fcf5be24cdb767f6f09105f56bc9..11a0e6cc6b646563623f6247cf2b9424ab7f18e7 100644 (file)
@@ -20,7 +20,7 @@ class BackupCommandTest extends TestCase
     public function test_command_does_full_backup_of_cwd_instance_by_default()
     {
         chdir('/var/www/bookstack');
-        $this->assertCount(0, glob('bookstack-backup-*.zip'));
+        $this->assertCount(0, glob('storage/backups/bookstack-backup-*.zip'));
 
         file_put_contents('/var/www/bookstack/themes/test.txt', static::$uniqueUserEmail . '-themes');
         file_put_contents('/var/www/bookstack/public/uploads/test.txt', static::$uniqueUserEmail . '-public-uploads');
@@ -30,8 +30,8 @@ class BackupCommandTest extends TestCase
         $result->assertSuccessfulExit();
         $result->assertStdoutContains("Backup finished.");
 
-        $this->assertCount(1, glob('bookstack-backup-*.zip'));
-        $zipFile = glob('bookstack-backup-*.zip')[0];
+        $this->assertCount(1, glob('storage/backups/bookstack-backup-*.zip'));
+        $zipFile = glob('storage/backups/bookstack-backup-*.zip')[0];
 
         $zip = new \ZipArchive();
         $zip->open($zipFile);
@@ -58,7 +58,7 @@ class BackupCommandTest extends TestCase
         ]);
         $result->assertSuccessfulExit();
 
-        $zipFile = glob('bookstack-backup-*.zip')[0];
+        $zipFile = glob('storage/backups/bookstack-backup-*.zip')[0];
 
         $zip = new \ZipArchive();
         $zip->open($zipFile);