You are here

public function BlockFormAlterTest::testAllowStyles in Block Style Plugins 8.2

Tests the allowStyles method.

@dataProvider allowStylesProvider

See also

::allowStyles()

File

tests/src/Unit/BlockFormAlterTest.php, line 195

Class

BlockFormAlterTest
@coversDefaultClass \Drupal\block_style_plugins\BlockFormAlter @group block_style_plugins

Namespace

Drupal\Tests\block_style_plugins\Unit

Code

public function testAllowStyles($type, $plugin, $expected) {
  $plugin_definition = [];
  if ($plugin) {
    $plugin_definition = [
      $type => [
        $plugin,
      ],
    ];
  }
  $return = $this->classInstance
    ->allowStyles('basic_block', $plugin_definition);
  $this
    ->assertEquals($expected, $return);
}