HM\BackUpWordPress\Common_File_Backup_Engine_Tests::test_complete_file_backup PHP Method

test_complete_file_backup() public method

Test a complete backup of the WordPress Site
    public function test_complete_file_backup()
    {
        // Reset root back to defaults
        Path::get_instance()->set_root(false);
        $this->backup->backup();
        $finder = $this->backup->get_files();
        foreach ($finder as $file) {
            $files[] = $file->getRelativePathname();
        }
        $this->assertFileExists($this->backup->get_backup_filepath());
        $this->assertArchiveFileCount($this->backup->get_backup_filepath(), iterator_count($finder));
        $this->assertArchiveContains($this->backup->get_backup_filepath(), $files);
    }