class StreamWrapperManagerTest
Same name and namespace in other branches
- 11.x core/tests/Drupal/KernelTests/Core/StreamWrapper/StreamWrapperManagerTest.php \Drupal\KernelTests\Core\StreamWrapper\StreamWrapperManagerTest
- 10 core/tests/Drupal/KernelTests/Core/StreamWrapper/StreamWrapperManagerTest.php \Drupal\KernelTests\Core\StreamWrapper\StreamWrapperManagerTest
- 8.9.x core/tests/Drupal/KernelTests/Core/StreamWrapper/StreamWrapperManagerTest.php \Drupal\KernelTests\Core\StreamWrapper\StreamWrapperManagerTest
@coversDefaultClass \Drupal\Core\StreamWrapper\StreamWrapperManager
@group File
Hierarchy
- class \Drupal\KernelTests\KernelTestBase extends \Drupal\Core\DependencyInjection\ServiceProviderInterface uses \Drupal\KernelTests\AssertLegacyTrait, \Drupal\KernelTests\AssertContentTrait, \Drupal\Tests\RandomGeneratorTrait, \Drupal\Tests\ConfigTestTrait, \Drupal\Tests\ExtensionListTestTrait, \Drupal\Tests\TestRequirementsTrait, \Drupal\Tests\Traits\PhpUnitWarnings, \Drupal\Tests\PhpUnitCompatibilityTrait, \Symfony\Bridge\PhpUnit\ExpectDeprecationTrait implements \PHPUnit\Framework\TestCase
- class \Drupal\KernelTests\Core\StreamWrapper\StreamWrapperManagerTest implements \Drupal\KernelTests\KernelTestBase
Expanded class hierarchy of StreamWrapperManagerTest
File
-
core/
tests/ Drupal/ KernelTests/ Core/ StreamWrapper/ StreamWrapperManagerTest.php, line 12
Namespace
Drupal\KernelTests\Core\StreamWrapperView source
class StreamWrapperManagerTest extends KernelTestBase {
/**
* The stream wrapper manager.
*
* @var \Drupal\Core\StreamWrapper\StreamWrapperManagerInterface
*/
protected $streamWrapperManager;
/**
* {@inheritdoc}
*/
protected static $modules = [
'system',
];
/**
* {@inheritdoc}
*/
protected function setUp() : void {
parent::setUp();
$this->streamWrapperManager = \Drupal::service('stream_wrapper_manager');
}
/**
* @covers ::getScheme
*
* @dataProvider providerTestUriScheme
*/
public function testUriScheme($uri, $expected) {
$this->assertSame($expected, StreamWrapperManager::getScheme($uri));
}
/**
* Data provider.
*/
public function providerTestUriScheme() {
$data = [];
$data[] = [
'public://filename',
'public',
];
$data[] = [
'public://extra://',
'public',
];
$data[] = [
'invalid',
FALSE,
];
return $data;
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.