public function testDetachReturnsResource() { $resource = fopen('php://memory', 'wb+'); $stream = new Stream($resource); $this->assertSame($resource, $stream->detach()); }