class StreamCapturer
Same name in other branches
- 9 core/tests/Drupal/Tests/StreamCapturer.php \Drupal\Tests\StreamCapturer
- 10 core/tests/Drupal/Tests/StreamCapturer.php \Drupal\Tests\StreamCapturer
Captures output to a stream and stores it for retrieval.
Hierarchy
- class \Drupal\Tests\StreamCapturer extends \Drupal\Tests\php_user_filter
Expanded class hierarchy of StreamCapturer
2 files declare their use of StreamCapturer
- BrowserTestBaseTest.php in core/
tests/ Drupal/ FunctionalTests/ BrowserTestBaseTest.php - KernelTestBaseTest.php in core/
tests/ Drupal/ KernelTests/ KernelTestBaseTest.php
File
-
core/
tests/ Drupal/ Tests/ StreamCapturer.php, line 12
Namespace
Drupal\TestsView source
class StreamCapturer extends \php_user_filter {
public static $cache = '';
public function filter($in, $out, &$consumed, $closing) : int {
while ($bucket = stream_bucket_make_writeable($in)) {
self::$cache .= $bucket->data;
$consumed += $bucket->datalen;
stream_bucket_append($out, $bucket);
}
return PSFS_FEED_ME;
}
}
Members
Title Sort descending | Modifiers | Object type | Summary |
---|---|---|---|
StreamCapturer::$cache | public static | property | |
StreamCapturer::filter | public | function |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.