12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- <?php
- /**
- * Created by PhpStorm.
- * User: stanley-king
- * Date: 16/6/21
- * Time: 下午8:28
- */
- define('BASE_ROOT_PATH',str_replace('/test','',dirname(__FILE__)));
- require_once(BASE_ROOT_PATH . '/fooder.php');
- require_once(BASE_ROOT_PATH . '/helper/bonus_helper.php');
- require_once(BASE_ROOT_PATH . '/helper/bonus/witholder.php');
- require_once(BASE_ROOT_PATH . '/helper/notify_helper.php');
- class bonus_helperTest extends PHPUnit_Framework_TestCase
- {
- public static function setUpBeforeClass()
- {
- Base::run_util();
- }
- public function testModel()
- {
- $item = Model('user_bonus')->field('*')->where(array('type_id' => 105,'bonus_id' => 2491))->select();
- bonus_helper::shake($item[0]['type_id'],$item[0]['bonus_id'],$item[0]['bonus_value'],3,bonus_helper::direct_dec());
- }
-
- public function testMemBonus()
- {
- $mem_bonus = new \bonus\witholder(36490);
- $mem_bonus->withold(7.30);
- }
- public function testExpire()
- {
- notify_helper::bonus_expired();
- }
- public function testPush()
- {
- $url = 'http://a.lrlz.com/mobile/index.php?act=rank_list&op=index&client_type=wap&list_sn=%3Cddc6ff0cd400941d3ae0f8b0889d54a1%3E&from=timeline&isappinstalled=0';
- $url = urldecode($url);
- }
- public static function tearDownAfterClass()
- {
- }
- }
|