* Init user data for case of the formatAppendParam method.

This commit is contained in:
tianshujie
2023-09-18 17:09:34 +08:00
parent e6ec20757b
commit 758f305d13
+12 -13
View File
@@ -2,29 +2,28 @@
<?php
include dirname(__FILE__, 5) . '/test/lib/init.php';
zdTable('user')->gen(5);
su('admin');
/**
title=productTao->formatAppendParam();
timeout=0
cid=1
pid=1
*/
global $tester;
$productTao = $tester->loadModel('product');
r($productTao->formatAppendParam('')) && p() && e('0');
r($productTao->formatAppendParam(array())) && p() && e('0');
r($productTao->formatAppendParam('1')) && p() && e('1');
r($productTao->formatAppendParam('1,')) && p() && e('1');
r($productTao->formatAppendParam('1,1')) && p() && e('1');
r($productTao->formatAppendParam('1,2')) && p() && e('1,2');
r($productTao->formatAppendParam('1,a')) && p() && e('1');
r($productTao->formatAppendParam(array('1'))) && p() && e('1');
r($productTao->formatAppendParam('')) && p() && e('0');
r($productTao->formatAppendParam(array())) && p() && e('0');
r($productTao->formatAppendParam('1')) && p() && e('1');
r($productTao->formatAppendParam('1,')) && p() && e('1');
r($productTao->formatAppendParam('1,1')) && p() && e('1');
r($productTao->formatAppendParam('1,2')) && p() && e('1,2');
r($productTao->formatAppendParam('1,a')) && p() && e('1');
r($productTao->formatAppendParam(array('1'))) && p() && e('1');
r($productTao->formatAppendParam(array('1', '1'))) && p() && e('1');
r($productTao->formatAppendParam(array('1', '2'))) && p() && e('1,2');
r($productTao->formatAppendParam(array('1', 'a'))) && p() && e('1');