public function MinisiteTestBase::assertMinisiteRemoved in Mini site 8
Assert that a Minisite archive and assets were removed.
4 calls to MinisiteTestBase::assertMinisiteRemoved()
- UploadBrowseAliasPathautoTest::testUploadAndBrowsingAlias in tests/
src/ Functional/ UploadBrowseAliasPathautoTest.php - Tests ZIP file upload and browsing minisite pages with Pathauto alias.
- UploadBrowseAliasTest::testUploadAndBrowsingAlias in tests/
src/ Functional/ UploadBrowseAliasTest.php - Tests ZIP file upload and browsing minisite pages with alias.
- UploadBrowseTest::testUploadAndBrowsing in tests/
src/ Functional/ UploadBrowseTest.php - Tests ZIP file upload and browsing minisite pages.
- UploadBrowseTest::testUploadAndRemoval in tests/
src/ Functional/ UploadBrowseTest.php - Tests ZIP file upload and removal, without removing a node.
File
- tests/
src/ Functional/ MinisiteTestBase.php, line 442
Class
- MinisiteTestBase
- Provides methods specifically for testing Minisite module's field handling.
Namespace
Drupal\Tests\minisite\FunctionalCode
public function assertMinisiteRemoved($node, $field_name, $test_archive_assets) {
$archive_file = $this
->getUploadedArchiveFile($node, $field_name);
$this
->assertArchiveFileNotExist($archive_file);
$this
->assertAssetFilesNotExist($test_archive_assets);
// Assert that archive file has been removed.
$this
->assertFileEntryNotExists($archive_file);
// Assert that there are no records in the 'minisites_assets' table about
// assets for this node.
foreach ($test_archive_assets as $test_archive_asset) {
$this
->assertNull(Asset::loadByUri($test_archive_asset));
}
}