activity_helperTest.php 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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 testUrlencode()
  19. {
  20. $x = 'http://a.lrlz.com/mobile/api/wxLogin/callback.php';
  21. $y = urlencode($x);
  22. }
  23. public function testGift()
  24. {
  25. $time = strftime("%Y-%m-%d %H:%M:%S",1474266342);
  26. $time = strftime("%Y-%m-%d %H:%M:%S",1474268695);
  27. $time = strftime("%Y-%m-%d %H:%M:%S",1474268698);
  28. $helper = new goods_helper();
  29. //$helper->get_summary(array(4181),$related_goods);
  30. }
  31. public function testBundling()
  32. {
  33. $helper = new goods_helper();
  34. //$ret = $helper->get_summary(array(2),$related_goods);
  35. }
  36. public function testSpu()
  37. {
  38. $helper = new goods_helper();
  39. $ret = $helper->get_spu(2629,4182,$err);
  40. }
  41. public function testTesterConfig()
  42. {
  43. $config['old_tabs'] = array(
  44. array('special_id' => 110,'name' => "home3"),
  45. array('special_id' => 181,'name' => "美妆教学"),
  46. array('special_id' => 161,'name' => "公司动态"),
  47. array('special_id' => 184,'name' => "热销榜单"));
  48. $config['old_specials'] = array(0,23,74,87,105,110,182,184,186,187);
  49. }
  50. public function testPublishConfig()
  51. {
  52. $config['old_tabs'] = array(
  53. array('special_id' => 246,'name' => " 推荐"),
  54. array('special_id' => 190,'name' => "全球专柜"),
  55. array('special_id' => 220,'name' => "男士"),
  56. array('special_id' => 197,'name' => "天猫店铺榜"),
  57. array('special_id' => 211,'name' => "美妆学院"),
  58. array('special_id' => 195,'name' => "丽人丽妆")
  59. );
  60. $config['old_specials'] = array(74,87,105,110,188,190,197,220);
  61. }
  62. public function testFull()
  63. {
  64. $contents = activity\full_sent::instance()->rules();
  65. $store_list = Model('store')->getStoreOnlineList(array('store_id' => 6),null,'','store_free_price');
  66. }
  67. public function testActivity()
  68. {
  69. // $acting = activity_helper::acting();
  70. // $unstart = activity_helper::unstart();
  71. // $acting = activity\groupbuy::instance()->acting();
  72. // $unstart = activity\groupbuy::instance()->unstart();
  73. // $acting = activity\limitime::instance()->acting();
  74. $unstart = activity\limitime::instance()->unstart();
  75. }
  76. }