You are here

public function PdbBlockTest::testAttachSettings in Decoupled Blocks 8

Tests the attachSettings() method.

File

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

Class

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

Namespace

Drupal\Tests\pdb\Unit\Plugin\Block

Code

public function testAttachSettings() {
  $component = [
    'settings' => [
      'pdb' => [
        'foobar',
      ],
    ],
  ];
  $expected = [
    'drupalSettings' => [
      'pdb' => [
        'foobar',
      ],
    ],
  ];
  $return = $this->plugin
    ->attachSettings($component);
  $this
    ->assertEquals($expected, $return);
}