You are here

public function PatternDefinitionTest::testGettersSetters in UI Patterns 8

Test getters.

@dataProvider definitionGettersProvider

File

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

Class

PatternDefinitionTest
@coversDefaultClass \Drupal\ui_patterns\Definition\PatternDefinition

Namespace

Drupal\Tests\ui_patterns\Unit\Definition

Code

public function testGettersSetters($getter, $name, $value) {
  $pattern_definition = new PatternDefinition([
    $name => $value,
  ]);
  $this
    ->assertEquals(call_user_func([
    $pattern_definition,
    $getter,
  ]), $value);
}