public function close() { if (!is_resource($this->_resource)) { return true; } fclose($this->_resource); if (is_resource($this->_resource)) { $this->close(); } return true; }
public function testConstruct() { $subject = new Context(array('timeout' => 300)); $this->assertTrue(300, $subject->timeout()); $subject->close(); unset($subject); }