123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- <?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()
- {
- }
- public static function tearDownAfterClass()
- {
- }
- }
|