You are here

public function PdbBlockTest::testAttachLibraries in Decoupled Blocks 8

Tests the attachLibraries() method.

@dataProvider attachLibrariesProvider

File

tests/src/Unit/Plugin/Block/PdbBlockTest.php, line 158

Class

PdbBlockTest
@coversDefaultClass \Drupal\pdb\Plugin\Block\PdbBlock @group pdb

Namespace

Drupal\Tests\pdb\Unit\Plugin\Block

Code

public function testAttachLibraries($value, $expected) {
  $component = [
    'machine_name' => 'example-1',
  ];
  $component = array_merge($component, $value);
  $return = $this->plugin
    ->attachLibraries($component);
  $this
    ->assertEquals($expected, $return);
}