12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
- <?php
- /**
- * Created by PhpStorm.
- * User: stanley-king
- * Date: 16/8/14
- * Time: 下午5:29
- */
- define('BASE_ROOT_PATH',str_replace('/test','',dirname(__FILE__)));
- require_once(BASE_ROOT_PATH . '/fooder.php');
- require_once(BASE_ROOT_PATH . '/helper/activity_helper.php');
- require_once(BASE_ROOT_PATH . '/helper/goods_helper.php');
- class activity_helperTest extends PHPUnit_Framework_TestCase
- {
- public static function setUpBeforeClass()
- {
- Base::run_util();
- }
- public function testUrlencode()
- {
- $x = 'http://a.lrlz.com/mobile/api/wxLogin/callback.php';
- $y = urlencode($x);
- }
- public function testGift()
- {
- $time = strftime("%Y-%m-%d %H:%M:%S",1474266342);
- $time = strftime("%Y-%m-%d %H:%M:%S",1474268695);
- $time = strftime("%Y-%m-%d %H:%M:%S",1474268698);
- $helper = new goods_helper();
- //$helper->get_summary(array(4181),$related_goods);
- }
- public function testBundling()
- {
- $helper = new goods_helper();
- //$ret = $helper->get_summary(array(2),$related_goods);
- }
- public function testSpu()
- {
- $helper = new goods_helper();
- $ret = $helper->get_spu(2629,4182,$err);
- }
- public function testTesterConfig()
- {
- $config['old_tabs'] = array(
- array('special_id' => 110,'name' => "home3"),
- array('special_id' => 181,'name' => "美妆教学"),
- array('special_id' => 161,'name' => "公司动态"),
- array('special_id' => 184,'name' => "热销榜单"));
- $config['old_specials'] = array(0,23,74,87,105,110,182,184,186,187);
- }
- public function testPublishConfig()
- {
- $config['old_tabs'] = array(
- array('special_id' => 246,'name' => " 推荐"),
- array('special_id' => 190,'name' => "全球专柜"),
- array('special_id' => 220,'name' => "男士"),
- array('special_id' => 197,'name' => "天猫店铺榜"),
- array('special_id' => 211,'name' => "美妆学院"),
- array('special_id' => 195,'name' => "丽人丽妆")
- );
- $config['old_specials'] = array(74,87,105,110,188,190,197,220);
- }
- public function testFull()
- {
- $contents = activity\full_sent::instance()->rules();
- $store_list = Model('store')->getStoreOnlineList(array('store_id' => 6),null,'','store_free_price');
- }
- public function testActivity()
- {
- // $acting = activity_helper::acting();
- // $unstart = activity_helper::unstart();
- // $acting = activity\groupbuy::instance()->acting();
- // $unstart = activity\groupbuy::instance()->unstart();
- // $acting = activity\limitime::instance()->acting();
- $unstart = activity\limitime::instance()->unstart();
- }
- }
|