12345678910111213141516171819202122232425262728293031 |
- <?php
- /**
- * Created by PhpStorm.
- * User: stanley-king
- * Date: 2017/5/25
- * Time: 下午3:55
- */
- define('BASE_ROOT_PATH',str_replace('/test','',dirname(__FILE__)));
- require_once(BASE_ROOT_PATH . '/fooder.php');
- require_once(BASE_ROOT_PATH . '/helper/stat_helper.php');
- class TestStat extends PHPUnit_Framework_TestCase
- {
- public static function setUpBeforeClass()
- {
- Base::run_util();
- }
- public function testBonusPaid()
- {
- $param = ['time' => time(),'use_type' => 2,'rate' => 30,'amount' => 50,'member_id' => 0];
- stat_helper::onUseBonus($param);
- }
- public function testMember()
- {
- $cur_date = new DateTime();
- $cur_date->setDate(2016,8,20);
- stat_helper::onDaiyMember($cur_date->getTimestamp());
- }
- }
|