function ExtractTest::providerTestExtractInvalid

Same name in other branches
  1. 9 core/modules/migrate/tests/src/Unit/process/ExtractTest.php \Drupal\Tests\migrate\Unit\process\ExtractTest::providerTestExtractInvalid()
  2. 10 core/modules/migrate/tests/src/Unit/process/ExtractTest.php \Drupal\Tests\migrate\Unit\process\ExtractTest::providerTestExtractInvalid()

Provides data for the testExtractInvalid.

File

core/modules/migrate/tests/src/Unit/process/ExtractTest.php, line 143

Class

ExtractTest
@coversDefaultClass \Drupal\migrate\Plugin\migrate\process\Extract @group migrate

Namespace

Drupal\Tests\migrate\Unit\process

Code

public static function providerTestExtractInvalid() {
    $xml_str = <<<XML
<xml version='1.0'?>
  <authors>
    <name>Test Extract Invalid</name>
  </authors>
XML;
    $object = (object) [
        'one' => 'test1',
        'two' => 'test2',
        'three' => 'test3',
    ];
    return [
        'empty string' => [
            '',
        ],
        'string' => [
            'Extract Test',
        ],
        'integer' => [
            1,
        ],
        'float' => [
            1.0,
        ],
        'NULL' => [
            NULL,
        ],
        'boolean' => [
            TRUE,
        ],
        'xml' => [
            $xml_str,
        ],
        'object' => [
            $object,
        ],
    ];
}

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