public function UploadFetcherTest::setUp in Feeds 8.3
Same name in this branch
- 8.3 tests/src/Functional/Feeds/Fetcher/UploadFetcherTest.php \Drupal\Tests\feeds\Functional\Feeds\Fetcher\UploadFetcherTest::setUp()
- 8.3 tests/src/Unit/Feeds/Fetcher/UploadFetcherTest.php \Drupal\Tests\feeds\Unit\Feeds\Fetcher\UploadFetcherTest::setUp()
Overrides FeedsUnitTestCase::setUp
File
- tests/
src/ Unit/ Feeds/ Fetcher/ UploadFetcherTest.php, line 45
Class
- UploadFetcherTest
- @coversDefaultClass \Drupal\feeds\Feeds\Fetcher\UploadFetcher @group feeds
Namespace
Drupal\Tests\feeds\Unit\Feeds\FetcherCode
public function setUp() {
parent::setUp();
$this->fileStorage = $this
->createMock(EntityStorageInterface::class);
$entity_manager = $this
->createMock(EntityTypeManagerInterface::class);
$entity_manager
->expects($this
->once())
->method('getStorage')
->with('file')
->will($this
->returnValue($this->fileStorage));
$this->fetcher = new UploadFetcher([
'feed_type' => $this
->createMock(FeedTypeInterface::class),
], 'test_plugin', [
'plugin_type' => 'fetcher',
], $this
->createMock(FileUsageInterface::class), $entity_manager, $this
->getMockStreamWrapperManager());
$this->fetcher
->setStringTranslation($this
->getStringTranslationStub());
$this->state = $this
->createMock(StateInterface::class);
}