protected function FeedsUnitTestCase::getMockStreamWrapperManager in Feeds 8.3
Returns a mock stream wrapper manager.
Return value
\Drupal\Core\StreamWrapper\StreamWrapperManager A mocked stream wrapper manager.
3 calls to FeedsUnitTestCase::getMockStreamWrapperManager()
- DirectoryFetcherFormTest::testConfigurationForm in tests/
src/ Unit/ Feeds/ Fetcher/ Form/ DirectoryFetcherFormTest.php - Tests the configuration form.
- DirectoryFetcherTest::setUp in tests/
src/ Unit/ Feeds/ Fetcher/ DirectoryFetcherTest.php - UploadFetcherTest::setUp in tests/
src/ Unit/ Feeds/ Fetcher/ UploadFetcherTest.php
File
- tests/
src/ Unit/ FeedsUnitTestCase.php, line 55
Class
- FeedsUnitTestCase
- Base class for Feeds unit tests.
Namespace
Drupal\Tests\feeds\UnitCode
protected function getMockStreamWrapperManager() {
$mock = $this
->createMock(StreamWrapperManager::class, [], [], '', FALSE);
$wrappers = [
'vfs' => 'VFS',
'public' => 'Public',
];
$mock
->expects($this
->any())
->method('getDescriptions')
->will($this
->returnValue($wrappers));
$mock
->expects($this
->any())
->method('getWrappers')
->will($this
->returnValue($wrappers));
return $mock;
}