public function test_complete_file_backup_with_excludes()
{
// Reset root back to defaults
Path::get_instance()->set_root(false);
$this->backup->set_excludes(new Excludes(array('wp-*')));
$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);
}