function MigrateSqlIdMapTest::lookupSourceIdMappingDataProvider

Same name in other branches
  1. 9 core/modules/migrate/tests/src/Unit/MigrateSqlIdMapTest.php \Drupal\Tests\migrate\Unit\MigrateSqlIdMapTest::lookupSourceIdMappingDataProvider()
  2. 10 core/modules/migrate/tests/src/Unit/MigrateSqlIdMapTest.php \Drupal\Tests\migrate\Unit\MigrateSqlIdMapTest::lookupSourceIdMappingDataProvider()
  3. 11.x core/modules/migrate/tests/src/Unit/MigrateSqlIdMapTest.php \Drupal\Tests\migrate\Unit\MigrateSqlIdMapTest::lookupSourceIdMappingDataProvider()

Data provider for testLookupSourceIdMapping().

Scenarios to test (for both hits and misses) are:

  • Single-value destination ID to single-value source ID.
  • Multi-value destination ID to multi-value source ID.
  • Single-value destination ID to multi-value source ID.
  • Multi-value destination ID to single-value source ID.

Return value

array An array of data values.

File

core/modules/migrate/tests/src/Unit/MigrateSqlIdMapTest.php, line 629

Class

MigrateSqlIdMapTest
Tests the SQL ID map plugin.

Namespace

Drupal\Tests\migrate\Unit

Code

public function lookupSourceIdMappingDataProvider() {
    return [
        [
            1,
            1,
        ],
        [
            2,
            2,
        ],
        [
            1,
            2,
        ],
        [
            2,
            1,
        ],
    ];
}

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