You are here

public function PatternDefinitionTest::testVariantsProcessing in UI Patterns 8

Test fields processing.

@dataProvider variantsProcessingProvider

File

tests/src/Unit/Definition/PatternDefinitionTest.php, line 99

Class

PatternDefinitionTest
@coversDefaultClass \Drupal\ui_patterns\Definition\PatternDefinition

Namespace

Drupal\Tests\ui_patterns\Unit\Definition

Code

public function testVariantsProcessing($actual, $expected) {
  $pattern_definition = new PatternDefinition();
  $data = $pattern_definition
    ->setVariants($actual)
    ->toArray();
  $this
    ->assertEquals($expected, $data['variants']);
}