function testSocketConnection()
 {
     lmb_require('core/src/lmbSys.class.php');
     $this->skipIf(lmbSys::isWin32(), "Windows platform doesn't support sockets.");
     $config = $this->connection->getConfig()->export();
     $config['socket'] = $this->getSocket();
     $connection_class = get_class($this->connection);
     try {
         $connection = new $connection_class($config);
         $connection->connect();
     } catch (Exception $e) {
         $this->fail("Connection through socket {$config['socket']} failed.");
     }
     if (isset($connection)) {
         $connection->disconnect();
         unset($connection);
     }
 }
示例#2
0
 function toString()
 {
     return lmbSys::isCli() ? $this->getTitle() . $this->asText() : $this->asHtml();
 }
示例#3
0
 protected static function _hasWin32NetPrefix($path)
 {
     if (lmbSys::isWin32() && strlen($path) > 2) {
         return substr($path, 0, 2) == self::WIN32_NET_PREFIX;
     }
     return false;
 }