public function MinisiteTestBase::assertAssetFilesNotExist in Mini site 8
Assert assets paths not exist.
1 call to MinisiteTestBase::assertAssetFilesNotExist()
- MinisiteTestBase::assertMinisiteRemoved in tests/
src/ Functional/ MinisiteTestBase.php - Assert that a Minisite archive and assets were removed.
File
- tests/
src/ Functional/ MinisiteTestBase.php, line 363
Class
- MinisiteTestBase
- Provides methods specifically for testing Minisite module's field handling.
Namespace
Drupal\Tests\minisite\FunctionalCode
public function assertAssetFilesNotExist($files) {
$actual_files = array_keys(LegacyWrapper::scanDirectory(Minisite::getCommonAssetDir(), '/.*/'));
foreach ($files as $test_file) {
$found_files = array_filter($actual_files, function ($value) use ($test_file) {
return substr($value, -strlen($test_file)) === $test_file;
});
$this
->assertTrue(empty($found_files), 'Asset file does not exist');
}
}