db_querytool_testdbinstance.php
来自「视频监控网络部分的协议ddns,的模块的实现代码,请大家大胆指正.」· PHP 代码 · 共 31 行
PHP
31 行
<?php// $Id: db_querytool_testDbInstance.php,v 1.1 2005/02/25 14:25:08 quipo Exp $require_once dirname(__FILE__).'/db_querytool_test_base.php';class TestOfDB_QueryToolDbInstance extends TestOfDB_QueryTool{ function TestOfDB_QueryToolDbInstance($name = __CLASS__) { $this->UnitTestCase($name); } function testSetDbInstanceDefault () { $db =& DB::connect(DB_DSN, $GLOBALS['DB_OPTIONS']); $qt =& new DB_QueryTool(); $qt->setDbInstance($db); $dbActual =& $qt->getDbInstance(); $this->assertEqual($db->fetchmode, $dbActual->fetchmode); } function SetDbInstanceOldWay () { $qt =& new DB_QueryTool(DB_DSN, $GLOBALS['DB_OPTIONS']); $db =& $qt->getDbInstance(); $this->assertTrue(is_a($db, 'mdb_common')); }}if (!defined('TEST_RUNNING')) { define('TEST_RUNNING', true); $test = &new TestOfDB_QueryToolDbInstance(); $test->run(new HtmlReporter());}?>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?