本文整理汇总了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());
}
示例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();
}
示例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>";
示例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;
示例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();
示例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();
示例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();
示例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();
示例9:
<?php
namespace Hasantayyar\Osbib;
include __DIR__ . '/vendor/autoload.php';
Test::test();