activity_helperTest.php 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: stanley-king
  5. * Date: 16/8/14
  6. * Time: 下午5:29
  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/activity_helper.php');
  11. require_once(BASE_ROOT_PATH . '/helper/goods_helper.php');
  12. class activity_helperTest extends PHPUnit_Framework_TestCase
  13. {
  14. public static function setUpBeforeClass()
  15. {
  16. Base::run_util();
  17. }
  18. public function testGift()
  19. {
  20. $time = strftime("%Y-%m-%d %H:%M:%S",1474266342);
  21. $time = strftime("%Y-%m-%d %H:%M:%S",1474268695);
  22. $time = strftime("%Y-%m-%d %H:%M:%S",1474268698);
  23. $helper = new goods_helper();
  24. //$helper->get_summary(array(4181),$related_goods);
  25. }
  26. public function testBundling()
  27. {
  28. $helper = new goods_helper();
  29. //$ret = $helper->get_summary(array(2),$related_goods);
  30. }
  31. public function testSpu()
  32. {
  33. $helper = new goods_helper();
  34. $ret = $helper->get_spu(2629,4182,$err);
  35. }
  36. public function testFull()
  37. {
  38. $contents = activity\full_sent::instance()->rules();
  39. $store_list = Model('store')->getStoreOnlineList(array('store_id' => 6),null,'','store_free_price');
  40. }
  41. public function testActivity()
  42. {
  43. // $acting = activity_helper::acting();
  44. // $unstart = activity_helper::unstart();
  45. // $acting = activity\groupbuy::instance()->acting();
  46. // $unstart = activity\groupbuy::instance()->unstart();
  47. // $acting = activity\limitime::instance()->acting();
  48. $unstart = activity\limitime::instance()->unstart();
  49. }
  50. }