znt/module/metric/test/model/buildsearchform.php

29 lines
1 KiB
PHP
Executable file
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/usr/bin/env php
<?php
/**
title=测试 metricModel::buildSearchForm();
timeout=0
cid=17063
- 执行metricTest模块的buildSearchFormTest方法参数是1, '/metric/browse' @1
- 执行metricTest模块的buildSearchFormTest方法参数是0, '/test/url' @1
- 执行metricTest模块的buildSearchFormTest方法参数是5, '' @1
- 执行metricTest模块的buildSearchFormTest方法参数是-1, '/negative/test' @1
- 执行metricTest模块的buildSearchFormTest方法参数是999, '/special?param=value&test=1' @1
*/
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/lib/model.class.php';
su('admin');
$metricTest = new metricModelTest();
r($metricTest->buildSearchFormTest(1, '/metric/browse')) && p() && e('1');
r($metricTest->buildSearchFormTest(0, '/test/url')) && p() && e('1');
r($metricTest->buildSearchFormTest(5, '')) && p() && e('1');
r($metricTest->buildSearchFormTest(-1, '/negative/test')) && p() && e('1');
r($metricTest->buildSearchFormTest(999, '/special?param=value&test=1')) && p() && e('1');