bouns_toplist_helperTest.php 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: stanley-king
  5. * Date: 16/7/22
  6. * Time: 下午4:34
  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/bouns_toplist_helper.php');
  11. class bouns_toplist_helperTest extends PHPUnit_Framework_TestCase
  12. {
  13. public static function setUpBeforeClass()
  14. {
  15. Base::run_util();
  16. }
  17. public function testMakesn()
  18. {
  19. $cur_date = '2016-07-21';
  20. $start_date = '2015-06-21';
  21. $x = date_parse($cur_date);
  22. $y = date_parse($start_date);
  23. $start = new DateTime();
  24. $start->setDate($x['year'],$x['month'],$x['day']);
  25. $start->setTime(0,0,0);
  26. $end = new DateTime();
  27. $end->setDate($y['year'],$y['month'],$y['day']);
  28. $end->setTime(0,0,0);
  29. $inter = $start->diff($end);
  30. $inter->days;
  31. }
  32. public function testListCount()
  33. {
  34. $count = ranklist_helper::list_count(36490);
  35. }
  36. public function testAddMondey()
  37. {
  38. ranklist_helper::add_money(36490,1.25);
  39. }
  40. public static function tearDownAfterClass()
  41. {
  42. }
  43. }