You are here

public function DazzlerTest::providerAddDefaultThemeProperties in Formdazzle! 2.x

Data provider for testAddDefaultThemeProperties().

See also

testAddDefaultThemeProperties()

File

tests/src/Unit/DazzlerTest.php, line 492

Class

DazzlerTest
@coversDefaultClass \Drupal\formdazzle\Dazzler @group formdazzle

Namespace

Drupal\Tests\formdazzle\Unit

Code

public function providerAddDefaultThemeProperties() {
  return [
    'Ignores non-theme defaults (#1)' => [
      $this
        ->getFixture('no_theme_defaults'),
      $this
        ->getFixture('no_theme_defaults'),
    ],
    'Ignores non-theme defaults (#2)' => [
      $this
        ->getFixture('mixed_defaults'),
      $this
        ->getFixture('mixed_defaults') + [
        '#theme' => 'mixed_defaults',
      ],
    ],
    'Adds #theme #theme_wrappers defaults' => [
      $this
        ->getFixture('with_theme_and_wrappers'),
      $this
        ->getFixture('with_theme_and_wrappers') + [
        '#theme' => 'with_theme',
        '#theme_wrappers' => [
          'with_theme_wrapper',
        ],
      ],
    ],
    'Does not override existing properties' => [
      $this
        ->getFixture('no_default_overrides'),
      $this
        ->getFixture('no_default_overrides'),
    ],
    'Does not add defaults for non-#type elements' => [
      $this
        ->getFixture('no_type'),
      $this
        ->getFixture('no_type'),
    ],
  ];
}