当前位置: 首页>>代码示例>>PHP>>正文


PHP allTests函数代码示例

本文整理汇总了PHP中allTests函数的典型用法代码示例。如果您正苦于以下问题:PHP allTests函数的具体用法?PHP allTests怎么用?PHP allTests使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了allTests函数的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: test

    test($b->_public == 0);
    test($b->_this == 0);
    test($b->_throw == 0);
    test($b->_use == 0);
    test($b->_var == 0);
    $p = $communicator->stringToProxy("test:tcp -p 10000");
    $c = $NS ? eval("return _and\\functionPrxHelper::uncheckedCast(\$p);") :
               eval("return and_functionPrxHelper::uncheckedCast(\$p);");
    $d = $NS ? eval("return _and\\diePrxHelper::uncheckedCast(\$p);") :
               eval("return and_diePrxHelper::uncheckedCast(\$p);");
    $e = $NS ? eval("return _and\\echoPrxHelper::uncheckedCast(\$p);") :
               eval("return and_echoPrxHelper::uncheckedCast(\$p);");
    $e1 = new echoI();
    $f = $NS ? eval("return _and\\enddeclarePrxHelper::uncheckedCast(\$p);") :
               eval("return and_enddeclarePrxHelper::uncheckedCast(\$p);");
    $f1 = new enddeclareI();
    $g = $NS ? eval("return new _and\\_endif();") : eval("return new and_endif();");
    $h = $NS ? eval("return new _and\\_endwhile();") : eval("return new and_endwhile();");
    $i = $NS ? constant("_and\\_or") : constant("and_or");
    $j = $NS ? constant("_and\\_print") : constant("and_print");
    $j = $NS ? constant("_and\\_require_once") : constant("and_require_once");
    echo "ok\n";
}

$communicator = Ice_initialize(&$argv);
allTests($communicator);
$communicator->destroy();

exit();
?>
开发者ID:bholl,项目名称:zeroc-ice,代码行数:30,代码来源:Client.php

示例2: allTests

function allTests($communicator)
{
    $ref = "test:default -p 12010";
    $base = $communicator->stringToProxy($ref);
    $cl = $base->ice_checkedCast("::Test::MyClass");
    $derived = $cl->ice_checkedCast("::Test::MyDerivedClass");
    echo "testing twoway operations... ";
    flush();
    twoways($communicator, $cl);
    twoways($communicator, $derived);
    $derived->opDerived();
    echo "ok\n";
    return $cl;
}
$communicator = Ice_initialize($argv);
$myClass = allTests($communicator);
echo "testing server shutdown... ";
flush();
$myClass->shutdown();
try {
    $myClass->opVoid();
    test(false);
} catch (Exception $ex) {
    $le = $NS ? "Ice\\LocalException" : "Ice_LocalException";
    if (!$ex instanceof $le) {
        throw $ex;
    }
    echo "ok\n";
}
$communicator->destroy();
exit;
开发者ID:externl,项目名称:ice,代码行数:31,代码来源:Client.php

示例3: foreach

    }
    //
    // Get server's Slice checksums.
    //
    $d = $checksum->getSliceChecksums();
    //
    // Compare the checksums. For a type FooN whose name ends in an integer N,
    // we assume that the server's type does not change for N = 1, and does
    // change for N > 1.
    //
    foreach ($d as $i => $value) {
        $n = 0;
        preg_match("/\\d+/", $i, $matches);
        if ($matches) {
            $n = (int) $matches[0];
        }
        test(isset($Ice_sliceChecksums[$i]));
        if ($n <= 1) {
            test($Ice_sliceChecksums[$i] == $d[$i]);
        } else {
            test($Ice_sliceChecksums[$i] != $d[$i]);
        }
    }
    echo "ok\n";
    return $checksum;
}
$communicator = Ice_initialize($argv);
$checksum = allTests($communicator);
$checksum->shutdown();
$communicator->destroy();
exit;
开发者ID:oceanwavechina,项目名称:ice,代码行数:31,代码来源:Client.php

示例4: test

        test($info->localAddress == $defaultHost);
    }
    test($info->rcvSize >= 1024);
    test($info->sndSize >= 2048);
    $ctx = $testIntf->getConnectionInfoAsContext();
    test($ctx["incoming"] == "true");
    test($ctx["adapterName"] == "TestAdapter");
    test($ctx["remoteAddress"] == $info->localAddress);
    test($ctx["localAddress"] == $info->remoteAddress);
    test($ctx["remotePort"] == $info->localPort);
    test($ctx["localPort"] == $info->remotePort);
    if ($base->ice_getConnection()->type() == "ws" || $base->ice_getConnection()->type() == "wss") {
        test($base->ice_getConnection()->type() == "ws" && $info instanceof $wsConnectionInfoClass || $base->ice_getConnection()->type() == "wss" && $info instanceof $wssConnectionInfoClass);
        test($info->headers["Upgrade"] == "websocket");
        test($info->headers["Connection"] == "Upgrade");
        test($info->headers["Sec-WebSocket-Protocol"] == "ice.zeroc.com");
        test(isset($info->headers["Sec-WebSocket-Accept"]));
        test($ctx["ws.Upgrade"] == "websocket");
        test($ctx["ws.Connection"] == "Upgrade");
        test($ctx["ws.Sec-WebSocket-Protocol"] == "ice.zeroc.com");
        test($ctx["ws.Sec-WebSocket-Version"] == "13");
        test(isset($ctx["ws.Sec-WebSocket-Key"]));
    }
    echo "ok\n";
    return $testIntf;
}
$communicator = Ice_initialize($argv);
$server = allTests($communicator);
$server->shutdown();
$communicator->destroy();
exit;
开发者ID:oceanwavechina,项目名称:ice,代码行数:31,代码来源:Client.php

示例5: test

        test($ex->b == "test");
        test($ex->o->a == 53);
        test($ex->ss == "test");
        test($ex->o2 == $ex->o);
    }
    try {
        $initial->opRequiredException(Ice_Unset, Ice_Unset, Ice_Unset);
    } catch (Exception $ex) {
        test($ex->a == Ice_Unset);
        test($ex->b == Ice_Unset);
        test($ex->o == Ice_Unset);
        test($ex->ss != Ice_Unset);
        test($ex->o2 != Ice_Unset);
    }
    try {
        $initial->opRequiredException(30, "test", new $oocls(53));
    } catch (Exception $ex) {
        test($ex->a == 30);
        test($ex->b == "test");
        test($ex->o->a == 53);
        test($ex->ss == "test");
        test($ex->o2 == $ex->o);
    }
    echo "ok\n";
    return $initial;
}
$communicator = Ice_initialize($argv);
$initial = allTests($communicator);
$initial->shutdown();
$communicator->destroy();
exit;
开发者ID:t3573393,项目名称:ice,代码行数:31,代码来源:Client.php

示例6: allTests

}
function allTests()
{
    global $NS;
    echo "testing Slice predefined macros... ";
    flush();
    if ($NS) {
        $d = new Test\_Default();
        test($d->x == 10);
        test($d->y == 10);
        $nd = new Test\NoDefault();
        test($nd->x != 10);
        test($nd->y != 10);
        $c = new Test\PhpOnly();
        test($c->lang == "php");
        test($c->version == Ice\intVersion());
    } else {
        $d = new Test_Default();
        test($d->x == 10);
        test($d->y == 10);
        $nd = new Test_NoDefault();
        test($nd->x != 10);
        test($nd->y != 10);
        $c = new Test_PhpOnly();
        test($c->lang == "php");
        test($c->version == Ice_intVersion());
    }
    echo "ok\n";
}
allTests();
exit;
开发者ID:oceanwavechina,项目名称:ice,代码行数:31,代码来源:Client.php

示例7: test

        test(false);
    } catch (Exception $ex) {
        $ule = $NS ? "Ice\\UnknownLocalException" : "Ice_UnknownLocalException";
        $one = $NS ? "Ice\\OperationNotExistException" : "Ice_OperationNotExistException";
        if (!$ex instanceof $ule && !$ex instanceof $one) {
            throw $ex;
        }
    }
    echo "ok\n";
    echo "catching unknown non-Ice exception... ";
    flush();
    try {
        $thrower->throwNonIceException();
        test(false);
    } catch (Exception $ex) {
        $ue = $NS ? "Ice\\UnknownException" : "Ice_UnknownException";
        if (!$ex instanceof $ue) {
            throw $ex;
        }
    }
    echo "ok\n";
    return $thrower;
}
$initData = $NS ? eval("return new Ice\\InitializationData;") : eval("return new Ice_InitializationData;");
$initData->properties = Ice_getProperties();
$initData->properties->setProperty("Ice.MessageSizeMax", "10");
$communicator = Ice_initialize($argv, $initData);
$thrower = allTests($communicator);
$thrower->shutdown();
$communicator->destroy();
exit;
开发者ID:externl,项目名称:ice,代码行数:31,代码来源:Client.php

示例8: runTest

};
//$testDifference();
function runTest($varName)
{
    echo "call made to: " . $varName . " test<br>";
    $varName = strtoupper(str_split($varName, 1)[0]) . substr($varName, 1);
    global ${"test" . $varName};
    if (is_callable(${"test" . $varName})) {
        ${"test" . $varName}();
    }
}
//runTest("difference");
//runTest("some");
//runTest("flatten");
function allTests($className)
{
    global $_;
    $_->each(get_class_methods($className), function ($varName) {
        runTest($varName);
    });
}
allTests(myUnderScore);
//echo ("This is the Testing Page");
?>





</body>
开发者ID:louisbuchbinder,项目名称:myUnderscorePHP,代码行数:30,代码来源:testingMyUnderscore.php


注:本文中的allTests函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。