getquerystring.php
来自「视频监控网络部分的协议ddns,的模块的实现代码,请大家大胆指正.」· PHP 代码 · 共 55 行
PHP
55 行
<?php// +----------------------------------------------------------------------+// | PHP Version 4 |// +----------------------------------------------------------------------+// | Copyright (c) 1997-2003 The PHP Group |// +----------------------------------------------------------------------+// | This source file is subject to version 2.02 of the PHP license, |// | that is bundled with this package in the file LICENSE, and is |// | available at through the world-wide-web at |// | http://www.php.net/license/2_02.txt. |// | If you did not receive a copy of the PHP license and are unable to |// | obtain it through the world-wide-web, please send a note to |// | license@php.net so we can mail you a copy immediately. |// +----------------------------------------------------------------------+// | Author: Wolfram Kriesing <wolfram@kriesing.de> |// +----------------------------------------------------------------------+//// $Id: GetQueryString.php,v 1.1 2003/09/23 11:18:20 cain 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 + -
显示快捷键?