You are here

public function FileTest::dataProviderPrepareValue in Feeds 8.3

Same name in this branch
  1. 8.3 tests/src/Unit/Feeds/Target/FileTest.php \Drupal\Tests\feeds\Unit\Feeds\Target\FileTest::dataProviderPrepareValue()
  2. 8.3 tests/src/Kernel/Feeds/Target/FileTest.php \Drupal\Tests\feeds\Kernel\Feeds\Target\FileTest::dataProviderPrepareValue()

Data provider for testPrepareValue().

File

tests/src/Unit/Feeds/Target/FileTest.php, line 130

Class

FileTest
@coversDefaultClass \Drupal\feeds\Feeds\Target\File @group feeds

Namespace

Drupal\Tests\feeds\Unit\Feeds\Target

Code

public function dataProviderPrepareValue() {
  return [
    // Description.
    [
      'expected' => [
        'description' => 'mydescription',
        'display' => FALSE,
      ],
      'values' => [
        'description' => 'mydescription',
      ],
    ],
    // Empty file target value.
    [
      'expected' => [],
      'values' => [
        'target_id' => '',
      ],
      'expected_exception' => EmptyFeedException::class,
    ],
  ];
}