You are here

public function FnStreamTest::testCanCloseOnDestruct in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/guzzlehttp/psr7/tests/FnStreamTest.php \GuzzleHttp\Tests\Psr7\FnStreamTest::testCanCloseOnDestruct()

File

vendor/guzzlehttp/psr7/tests/FnStreamTest.php, line 33

Class

FnStreamTest
@covers GuzzleHttp\Psr7\FnStream

Namespace

GuzzleHttp\Tests\Psr7

Code

public function testCanCloseOnDestruct() {
  $called = false;
  $s = new FnStream([
    'close' => function () use (&$called) {
      $called = true;
    },
  ]);
  unset($s);
  $this
    ->assertTrue($called);
}