mirror of
https://github.com/silverstripe/silverstripe-dms
synced 2024-10-22 14:05:56 +02:00
Add test for exclusion of DMS folder name from Filesystem sync
This commit is contained in:
parent
9b31a7071f
commit
b9b7be0417
@ -166,4 +166,18 @@ class DMSTest extends FunctionalTest
|
||||
$this->assertCount(2, $sets);
|
||||
$this->assertContainsOnlyInstancesOf('DMSDocumentSet', $sets);
|
||||
}
|
||||
|
||||
/**
|
||||
* Ensure that assets/* folders are not included in filesystem sync operations
|
||||
*/
|
||||
public function testFolderExcludedFromFilesystemSync()
|
||||
{
|
||||
// Undo setup config changes
|
||||
Config::unnest();
|
||||
Config::nest();
|
||||
|
||||
$result = Filesystem::config()->get('sync_blacklisted_patterns');
|
||||
$folderName = substr(DMS::config()->get('folder_name'), 7);
|
||||
$this->assertContains('/^' . $folderName . '$/i', $result);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user