You are here

public function AssetTest::dataProviderAssetFromValues in Mini site 8

Data provider for testAssetFromValues.

File

tests/src/Functional/AssetTest.php, line 102

Class

AssetTest
Class AssetTest.

Namespace

Drupal\Tests\minisite\Functional

Code

public function dataProviderAssetFromValues() {
  return [
    // All normally provided keys.
    [
      [
        'entity_type' => 'someval',
        'entity_bundle' => 'someval',
        'entity_id' => 'someval',
        'entity_language' => 'someval',
        'field_name' => 'someval',
        'source' => 'someval',
      ],
      FALSE,
    ],
    // Only required.
    [
      [
        'entity_type' => 'someval',
        'entity_bundle' => 'someval',
        'entity_id' => 'someval',
        'entity_language' => 'someval',
        'field_name' => 'someval',
        'source' => 'someval',
      ],
      FALSE,
    ],
    // Missing keys.
    [
      [
        'entity_type' => 'someval',
        'entity_bundle' => 'someval',
        'entity_id' => 'someval',
        'entity_language' => 'someval',
        'field_name' => 'someval',
      ],
      TRUE,
    ],
    // Fields with no values.
    [
      [
        'entity_type' => '',
        'entity_bundle' => 'someval',
        'entity_id' => NULL,
        'entity_language' => 'someval',
        'field_name' => FALSE,
        'source' => 'someval',
      ],
      TRUE,
    ],
  ];
}