You are here

public function EntityReferenceSelectionUnitTest::providerTestSetConfiguration in Drupal 8

Provides test data for ::testSetConfiguration()

Return value

array

See also

\Drupal\Tests\Core\EntityReferenceSelection\testSetConfiguration

File

core/tests/Drupal/Tests/Core/EntityReferenceSelection/EntityReferenceSelectionUnitTest.php, line 58

Class

EntityReferenceSelectionUnitTest
Provides unit testing for selection handlers.

Namespace

Drupal\Tests\Core\EntityReferenceSelection

Code

public function providerTestSetConfiguration() {
  return [
    [
      [
        'setting1' => 'foo',
        'setting2' => [
          'bar' => 'bar value',
          'baz' => 'baz value',
        ],
      ],
    ],
    [
      [
        'handler_settings' => [
          'setting1' => 'foo',
          'setting2' => [
            'bar' => 'bar value',
            'baz' => 'baz value',
          ],
        ],
      ],
    ],
    [
      [
        'setting1' => 'foo',
        'handler_settings' => [
          'setting2' => [
            'bar' => 'bar value',
            'baz' => 'baz value',
          ],
        ],
      ],
    ],
    [
      [
        'setting1' => 'foo',
        'setting2' => [
          'bar' => 'bar value',
          'baz' => 'baz value',
        ],
        'handler_settings' => [
          // Same setting from root level takes precedence.
          'setting2' => 'this will be overwritten',
        ],
      ],
    ],
  ];
}