You are here

public function BlazyManagerTest::testBlazyManagerMethods in Blazy 8.2

Same name and namespace in other branches
  1. 8 tests/src/Kernel/BlazyManagerTest.php \Drupal\Tests\blazy\Kernel\BlazyManagerTest::testBlazyManagerMethods()

Tests cases for various methods.

@covers ::attach

File

tests/src/Kernel/BlazyManagerTest.php, line 237

Class

BlazyManagerTest
Tests the Blazy manager methods.

Namespace

Drupal\Tests\blazy\Kernel

Code

public function testBlazyManagerMethods() {

  // Tests Blazy attachments.
  $attach = [
    'blazy' => TRUE,
    'media_switch' => 'blazy_test',
  ];
  $attachments = $this->blazyManager
    ->attach($attach);
  $this
    ->assertArrayHasKey('blazy', $attachments['drupalSettings']);
}