static function StreamWrapper::register in X Autoload 7.4
Same name and namespace in other branches
- 7.5 tests/src/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/
lib/ ClassFinderAdapterTest.php - ClassLoaderTest::setUp in tests/
lib/ ClassLoaderTest.php - drupal-apc.php in tests/
scripts/ drupal-apc.php - File to test bootstrap with APC.
- DrupalBootTest::setUp in tests/
lib/ DrupalBootTest.php
File
- tests/
lib/ 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;
}