You are here

public function PatternDefinitionTest::testFieldsProcessing in UI Patterns 8

Test fields processing.

@dataProvider fieldsProcessingProvider

File

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

Class

PatternDefinitionTest
@coversDefaultClass \Drupal\ui_patterns\Definition\PatternDefinition

Namespace

Drupal\Tests\ui_patterns\Unit\Definition

Code

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