getquerystring.php

来自「视频监控网络部分的协议ddns,的模块的实现代码,请大家大胆指正.」· PHP 代码 · 共 40 行

PHP
40
字号
<?php//// $Id: GetQueryString.php,v 1.1 2004/03/17 15:12:05 quipo Exp $///*** This class just checks if the query is returned, not if* the query was properly rendered. This should be subject to* some other tests!** @package tests*/class tests_GetQueryString extends tests_UnitTest{    function _setup()    {        $this->question =& new tests_Common(TABLE_QUESTION);    }    function test_selectAll()    {        $this->_setup();        $this->assertStringEquals(                            'SELECT question.id AS "id",question.question AS "question" FROM question',                            $this->question->getQueryString());    }    function test_selectWithWhere()    {        $this->_setup();        $this->question->setWhere('id=1');        $this->assertStringEquals(                            'SELECT question.id AS "id",question.question AS "question" FROM question'.                            ' WHERE id=1',                            $this->question->getQueryString());    }}?>

⌨️ 快捷键说明

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