znt/module/weekly/test/model/gettips.php

31 lines
1.2 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
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/lib/model.class.php';
su('admin');
/**
title=测试 weeklyModel->getTips();
cid=19735
pid=1
测试type值为progressdata值为0 >> 0
测试type值为progressdata值为1 >> 0
测试type值为costdata值为0 >> 0
测试type值为costdata值为1 >> 0
测试type值为空data值为0 >> 0
测试type值为空data值为1 >> 0
*/
$typeList = array('progress', 'cost', '');
$dataList = array(0, 1);
$weekly = new weeklyModelTest();
r($weekly->getTipsTest($typeList[0], $dataList[0])) && p() && e('0'); //测试type值为progressdata值为0
r($weekly->getTipsTest($typeList[0], $dataList[1])) && p() && e('0'); //测试type值为progressdata值为1
r($weekly->getTipsTest($typeList[1], $dataList[0])) && p() && e('0'); //测试type值为costdata值为0
r($weekly->getTipsTest($typeList[1], $dataList[1])) && p() && e('0'); //测试type值为costdata值为1
r($weekly->getTipsTest($typeList[2], $dataList[0])) && p() && e('0'); //测试type值为空data值为0
r($weekly->getTipsTest($typeList[2], $dataList[1])) && p() && e('0'); //测试type值为空data值为1