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


PHP Test::test方法代码示例

本文整理汇总了PHP中Test::test方法的典型用法代码示例。如果您正苦于以下问题:PHP Test::test方法的具体用法?PHP Test::test怎么用?PHP Test::test使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Test的用法示例。


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

示例1: testModelShort

 public function testModelShort()
 {
     $_REQUEST['__url'] = 'home';
     $this->ob();
     $test = new Test();
     $this->assertTrue($test->test());
 }
开发者ID:arzynik,项目名称:cana,代码行数:7,代码来源:ModelTest.php

示例2: index

 public function index()
 {
     /*-------------------------------------
     		= 我的资料
     		-------------------------------------*/
     $my_info = $this->api->user_getInfo($this->mid);
     $this->assign('my_info', $my_info);
     /*-------------------------------------
     		= 好友列表
     		-------------------------------------*/
     $my_fris = $this->api->friend_get();
     $fris_info = $this->api->user_getInfo($my_fris);
     $this->assign('fris_info', $fris_info);
     /*-------------------------------------
     		= 通知
     		-------------------------------------*/
     $notify_num = $this->api->notify_getNewNum();
     //通知个数
     $notifys = $this->api->notify_get("notification");
     //通知内容
     $this->assign('notify_num', $notify_num);
     $this->assign('notify_con', $notifys);
     /*-------------------------------------
     		= 好友动态
     		-------------------------------------*/
     $my_feeds = $this->api->feed_get("fri", "all", 10);
     $fri_feeds = $this->api->feed_get("my", "all", 3);
     $this->assign('my_feeds', $my_feeds);
     $this->assign('fri_feeds', $fri_feeds);
     /*-------------------------------------
     		= 公共类库
     		-------------------------------------*/
     vendor("Test");
     $vendor_test = new Test();
     $vendor = $vendor_test->test();
     $this->assign('vendor', $vendor);
     $this->display();
 }
开发者ID:wangping1987,项目名称:dhfriendluck,代码行数:38,代码来源:ExpAction.class.php

示例3: Test

<?php

include "../libs/Test.php";
$test = new Test(true ? COMPLETE : true, "Test Cache class");
$test->test(10, 2 + 8, "sum");
$test->test(20, 12 + 8, "sum");
$test->test(20, 12 + 8);
$test->test(11, 2 + 8, "no sum");
$test->render();
echo "<p class='well'>This test will fail..to  show how works when fails.</p>";
开发者ID:rg1024,项目名称:aiki-ideas,代码行数:10,代码来源:test_Test.php

示例4: foreach

{
    foreach ($resultsArray as $results) {
        file_put_contents($file, implode("\t", $results) . PHP_EOL, FILE_APPEND);
    }
}
$testMin = 1;
$testMax = 100000;
$tests = 50;
$print = true;
$verbose = false;
$filename = __DIR__ . '/data/minhash/results.' . date('Y-m-d_h-i-s') . '.csv';
file_put_contents($filename, '');
for ($i = $testMin; $i <= $testMax; $i += $block) {
    $block = pow(10, max(0, floor(log10($i))));
    $test = new Test($i);
    $test->test($tests);
    if ($print) {
        if ($verbose) {
            testHeader('Tested: ' . $i);
            printResults($test->results());
        }
        testHeader('Average: ' . $i);
        printResults(array($test->averages()));
    }
    fileResults($filename, $test->results());
    echo "Tested {$i}\r";
}
echo PHP_EOL;
class Test
{
    private $i;
开发者ID:joegreen0991,项目名称:hyperloglog,代码行数:31,代码来源:minhashtest.php

示例5: getPeriodToSleep

        }
        function getPeriodToSleep($obj)
        {
            return int;
        }
        function getPeriodBright($obj)
        {
            return int;
        }
        function getUsesPerCycle($obj)
        {
            return int;
        }
        function getUsePerAction($obj, $action)
        {
            return int;
        }
        function getRange($obj, $action)
        {
            return int;
        }
        function getConfortZone($obj)
        {
            return array();
        }
        require_once '../model/customWolf.php';
    }
}
$test = new Test();
$test->test();
开发者ID:hrosalgado,项目名称:TFG,代码行数:30,代码来源:testPredator.php

示例6: Test

<?php

include "../libs/Test.php";
include "../libs/functions.php";
$test = new Test(defined("COMPLETE") ? COMPLETE : true, "Test Config class");
// providers..
$a = array("def-1" => true, "def-2" => false);
$b = array("def-2" => true, "def-3" => "999");
$good = array("def-1" => true, "def-2" => true);
// tests
$test->test($good, array_default_options($a, $b), "array_default_option");
$test->render();
开发者ID:rg1024,项目名称:aiki-ideas,代码行数:12,代码来源:test_functions.php

示例7: Test

<?php

include "../libs/Test.php";
include "../libs/Config.php";
// providers..
$test = new Test(defined("COMPLETE") ? COMPLETE : true, "Test Config class");
$config = new Config(array("test-1" => 1, "test-2" => false));
// test
$test->test(1, $config->get("test-1"), "get");
$test->test(false, $config->get("test-2"), "get");
$test->test(NULL, $config->get("test-3"), "get null");
$test->render();
开发者ID:rg1024,项目名称:aiki-ideas,代码行数:12,代码来源:test_Config.php

示例8: Config

<?php

include "../libs/Test.php";
// providers
include "../libs/Config.php";
$config = new Config(array("start" => microtime(), "debug" => true, "caches" => array("html" => array("dir" => "tmp", "timeout" => 500))));
include "../libs/Cache.php";
//@TODO phpUNIT
$dir = dirname(__FILE__) . "/tmp";
if (!is_dir($dir)) {
    mkdir(dirname(__FILE__) . "/tmp");
}
$cache = new Cache($config);
$test = new Test(defined("COMPLETE") ? COMPLETE : true, "Test Cache class");
$test->test(true, $cache->is_cacheable("html"), "cacheable html");
$test->test(false, $cache->is_cacheable("png"), "cacheable png");
$test->render();
开发者ID:rg1024,项目名称:aiki-ideas,代码行数:17,代码来源:test_Cache.php

示例9:

<?php

namespace Hasantayyar\Osbib;

include __DIR__ . '/vendor/autoload.php';
Test::test();
开发者ID:hasantayyar,项目名称:osbib,代码行数:6,代码来源:test.php


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