TestStat.php 781 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: stanley-king
  5. * Date: 2017/5/25
  6. * Time: 下午3:55
  7. */
  8. define('BASE_ROOT_PATH',str_replace('/test','',dirname(__FILE__)));
  9. require_once(BASE_ROOT_PATH . '/fooder.php');
  10. require_once(BASE_ROOT_PATH . '/helper/stat_helper.php');
  11. class TestStat extends PHPUnit_Framework_TestCase
  12. {
  13. public static function setUpBeforeClass()
  14. {
  15. Base::run_util();
  16. }
  17. public function testBonusPaid()
  18. {
  19. $param = ['time' => time(),'use_type' => 2,'rate' => 30,'amount' => 50,'member_id' => 0];
  20. stat_helper::onUseBonus($param);
  21. }
  22. public function testMember()
  23. {
  24. $cur_date = new DateTime();
  25. $cur_date->setDate(2016,8,20);
  26. stat_helper::onDaiyMember($cur_date->getTimestamp());
  27. }
  28. }