public function testAttachResource() { $resource = fopen('php://memory', 'w+b'); $stream = new Stream(false); $stream->attach($resource); $this->assertSame($resource, $stream->getResource()); }