⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 limit.php

📁 视频监控网络部分的协议ddns,的模块的实现代码,请大家大胆指正.
💻 PHP
字号:
<?php////  $Id: Limit.php,v 1.1 2003/06/06 14:39:44 cain Exp $//class tests_Limit extends tests_UnitTest{    // test if setLimit works    function test_setLimit()    {        $user = new tests_Common(TABLE_USER);        $user->setLimit(0,10);        $this->assertEquals(array(0,10),$user->getLimit());    }    // test if setLimit works    function test_setLimit1()    {        $user = new tests_Common(TABLE_USER);                $user->add(array('login'=>1));        $user->add(array('login'=>2));        $user->add(array('login'=>3));        $user->add(array('login'=>4));                $user->setLimit(0,2);        $this->assertEquals(2,sizeof($user->getAll()));            $user->setLimit(0,3);        $this->assertEquals(3,sizeof($user->getAll()));    }    // test if getAll works    // setLimit should have no effect when parameters are given to getAll()    function test_getAll()    {        $user = new tests_Common(TABLE_USER);        $user->setLimit(0,10);        $user->add(array('login'=>1));        $user->add(array('login'=>2));        $user->add(array('login'=>3));        $user->add(array('login'=>4));        $this->assertEquals(1,sizeof($user->getAll(0,1)));        $user->setLimit(0,3);        $this->assertEquals(2,sizeof($user->getAll(0,2)));                $this->assertEquals(3,sizeof($user->getAll()));    }    // test if getAll works    // setLimit should have no effect when parameters are given to getAll()    function test_getCol()    {        $user = new tests_Common(TABLE_USER);        $user->setLimit(0,10);        $user->add(array('login'=>1));        $user->add(array('login'=>2));        $user->add(array('login'=>3));        $user->add(array('login'=>4));        $this->assertEquals(1,sizeof($user->getCol('id',0,1)));        $user->setLimit(0,3);        $this->assertEquals(2,sizeof($user->getCol('id',0,2)));                $this->assertEquals(3,sizeof($user->getCol('id')));    }}?>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -