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); } }
protected static function _hasWin32NetPrefix($path) { if (lmbSys::isWin32() && strlen($path) > 2) { return substr($path, 0, 2) == self::WIN32_NET_PREFIX; } return false; }