class 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 8 
Namespace
Drupal\TestsView source
class StreamCapturer extends \php_user_filter {
  public static $cache = '';
  public function filter($in, $out, &$consumed, $closing) {
    while ($bucket = stream_bucket_make_writeable($in)) {
      self::$cache .= $bucket->data;
      // cSpell:disable-next-line
      $consumed += $bucket->datalen;
      stream_bucket_append($out, $bucket);
    }
    // cSpell:disable-next-line
    return PSFS_FEED_ME;
  }
}Members
| Title Sort descending | Modifiers | Object type | Summary | 
|---|---|---|---|
| StreamCapturer::$cache | public static | property | |
| StreamCapturer::filter | public | function | #[\ReturnTypeWillChange] | 
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.
