You are here

protected function AcquiadamNotificationTest::generateNewVersionAndNotify in Media: Acquia DAM 8

Updates an Asset and add notification to it.

Parameters

\cweagans\webdam\Entity\Asset $asset: The asset to be updated.

1 call to AcquiadamNotificationTest::generateNewVersionAndNotify()
AcquiadamNotificationTest::testNotifications in tests/src/Kernel/AcquiadamNotificationTest.php
Tests if assets are updated properly using notification sync.

File

tests/src/Kernel/AcquiadamNotificationTest.php, line 90

Class

AcquiadamNotificationTest
Tests integration with notification API.

Namespace

Drupal\Tests\media_acquiadam\Kernel

Code

protected function generateNewVersionAndNotify(Asset $asset) {
  $this
    ->generateNewVersion($asset);
  $this->testClient
    ->addNotification([
    'action' => 'asset_version',
    'source' => [
      'type' => 'asset',
      'id' => $asset->id,
    ],
  ]);
}