function FlattenTest::providerTestFlattenInvalid

Same name in other branches
  1. 10 core/modules/migrate/tests/src/Unit/process/FlattenTest.php \Drupal\Tests\migrate\Unit\process\FlattenTest::providerTestFlattenInvalid()
  2. 11.x core/modules/migrate/tests/src/Unit/process/FlattenTest.php \Drupal\Tests\migrate\Unit\process\FlattenTest::providerTestFlattenInvalid()

Provides data for the testFlattenInvalid.

File

core/modules/migrate/tests/src/Unit/process/FlattenTest.php, line 69

Class

FlattenTest
Tests the flatten plugin.

Namespace

Drupal\Tests\migrate\Unit\process

Code

public function providerTestFlattenInvalid() {
    $xml_str = <<<XML
<xml version='1.0'?>
<authors>
 <name>Ada Lovelace</name>
</authors>
XML;
    return [
        'empty string' => [
            '',
        ],
        'string' => [
            'Kate Sheppard',
        ],
        'integer' => [
            1,
        ],
        'float' => [
            1.2,
        ],
        'NULL' => [
            NULL,
        ],
        'boolean' => [
            TRUE,
        ],
        'xml' => [
            $xml_str,
        ],
    ];
}

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