static function StreamWrapper::register in X Autoload 7.5
Same name and namespace in other branches
- 7.4 tests/lib/Filesystem/StreamWrapper.php \Drupal\xautoload\Tests\Filesystem\StreamWrapper::register()
Parameters
string $protocol:
Return value
VirtualFilesystem A newly created virtual filesystem.
Throws
\Exception
4 calls to StreamWrapper::register()
- ClassFinderAdapterTest::setUp in tests/
src/ ClassFinderAdapterTest.php - ClassLoaderTest::setUp in tests/
src/ ClassLoaderTest.php - DrupalBootHookTest::prepare in tests/
src/ DrupalBootTest/ DrupalBootHookTest.php - setUp() does not help us because of the process sharing problem. So we use this instead.
- DrupalBootTest::prepare in tests/
src/ DrupalBootTest/ DrupalBootTest.php - setUp() does not help us because of the process sharing problem. So we use this instead.
File
- tests/
src/ Filesystem/ StreamWrapper.php, line 28
Class
- StreamWrapper
- Intercept calls to the filesystem, so we don't have to create fixture files.
Namespace
Drupal\xautoload\Tests\FilesystemCode
static function register($protocol) {
if (!stream_wrapper_register($protocol, 'Drupal\\xautoload\\Tests\\Filesystem\\StreamWrapper')) {
throw new \Exception("Failed to register stream wrapper.");
}
self::$filesystem = new VirtualFilesystem();
return self::$filesystem;
}