close() public method

Closes the stream
public close ( ) : boolean
return boolean True on closed connection
示例#1
0
 public function testClose()
 {
     $stream = new Stream($this->_testConfig);
     $result = $stream->open();
     $this->assertTrue($result);
     $result = $stream->close();
     $this->assertTrue($result);
     $result = $stream->resource();
     $this->assertFalse(is_resource($result));
 }
示例#2
0
 public function testClose()
 {
     $stream = new Stream($this->_testConfig);
     $result = $stream->open();
     $this->assertNotEmpty($result);
     $result = $stream->close();
     $this->assertTrue($result);
     $result = $stream->resource();
     $this->assertNotInternalType('resource', $result);
 }