Skip to content

Commit

Permalink
Remove file cleaning from DTT tests.
Browse files Browse the repository at this point in the history
Files are marked for deletion with Drupal configuration, see
City-of-Helsinki/drupal-module-helfi-azure-fs#35
  • Loading branch information
hyrsky committed Jan 8, 2025
1 parent 887d511 commit e55c785
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions tests/dtt/src/ExistingSite/NewsContentTypeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,15 +101,13 @@ public function testNewsOgImage() : void {
'uri' => $uri,
]);
$file->save();
$this->markEntityForCleanup($file);

$media = Media::create([
'bundle' => 'image',
'name' => 'Custom name',
'field_media_image' => $file->id(),
]);
$media->save();
$this->markEntityForCleanup($file);

$node = $this->createNode([
'type' => 'news_item',
Expand Down Expand Up @@ -189,15 +187,14 @@ public function testNewsArticleOgImage() : void {
'uri' => $uri,
]);
$file->save();
$this->markEntityForCleanup($file);

$media = Media::create([
'bundle' => 'image',
'name' => 'Custom name',
'field_media_image' => $file->id(),
]);
$media->save();
$this->markEntityForCleanup($file);
$this->markEntityForCleanup($media);

$node->set('field_main_image', $media->id());
$node->save();
Expand Down

0 comments on commit e55c785

Please sign in to comment.