function ContactSettingsTest::providerSource

Same name in other branches
  1. 9 core/modules/contact/tests/src/Kernel/Plugin/migrate/source/d6/ContactSettingsTest.php \Drupal\Tests\contact\Kernel\Plugin\migrate\source\d6\ContactSettingsTest::providerSource()
  2. 8.9.x core/modules/contact/tests/src/Kernel/Plugin/migrate/source/d6/ContactSettingsTest.php \Drupal\Tests\contact\Kernel\Plugin\migrate\source\d6\ContactSettingsTest::providerSource()
  3. 11.x core/modules/contact/tests/src/Kernel/Plugin/migrate/source/d6/ContactSettingsTest.php \Drupal\Tests\contact\Kernel\Plugin\migrate\source\d6\ContactSettingsTest::providerSource()

File

core/modules/contact/tests/src/Kernel/Plugin/migrate/source/d6/ContactSettingsTest.php, line 25

Class

ContactSettingsTest
Tests D6 contact settings source plugin.

Namespace

Drupal\Tests\contact\Kernel\Plugin\migrate\source\d6

Code

public static function providerSource() {
    $tests = [];
    $tests[0]['source_data']['variable'] = [
        [
            'name' => 'site_name',
            'value' => serialize('foo!'),
        ],
    ];
    $tests[0]['source_data']['contact'] = [
        [
            'cid' => '1',
            'category' => 'Website feedback',
            'recipients' => 'admin@example.com',
            'reply' => '',
            'weight' => '0',
            'selected' => '1',
        ],
    ];
    $tests[0]['expected_data'] = [
        [
            'default_category' => '1',
            'site_name' => 'foo!',
        ],
    ];
    $tests[0]['expected_count'] = NULL;
    $tests[0]['configuration']['variables'] = [
        'site_name',
    ];
    return $tests;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.