1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- <?php
- /**
- * Created by PhpStorm.
- * User: stanley-king
- * Date: 16/6/23
- * Time: 下午10:21
- */
- define('BASE_ROOT_PATH',str_replace('/test','',dirname(__FILE__)));
- require_once(BASE_ROOT_PATH . '/fooder.php');
- require_once(BASE_ROOT_PATH . '/helper/relation_helper.php');
- class relation_helperTest extends PHPUnit_Framework_TestCase
- {
- public static function setUpBeforeClass()
- {
- Base::run_util();
- }
- public function testUpContactsA()
- {
- //36490
- $contacts = array('13911129868','13911129869','13911129870','13911129871','13911129867','15618951806','18612396521');
- relation_helper::onUpContacts(36490,'13911129867','江海苗',$contacts);
- }
- public function testUpContactsB()
- {
- //36490
- $contacts = array('13911129867','13911129869','13911129870','13911129872');
- relation_helper::onUpContacts(36511,'18612396521','秦梦洁',$contacts);
- }
- public function testOnLogin()
- {
- relation_helper::onLogin(36490);
- relation_helper::onLogin(36511);
- }
-
- public function testUpContactsC()
- {
- try
- {
- $contacts = '%5B%22178-0211-8910%22%2C%22182-6227-3057%22%2C%22189-6195-0030%22%5D';
- $contacts = session_helper::parse_contacts($contacts);
- relation_helper::onUpContacts(36511,'18612396521','秦梦洁',$contacts);
- } catch (Exception $ex) {
- echo $ex->getMessage();
- }
- }
- public function testMakeType()
- {
- $reg = '/make_type=(\d+)/i';
- $ret = preg_match($reg, '发送红包,红包单号: xxxxxx make_type=6', $arr);
- }
- public function testFollower()
- {
- $follower = relation_helper::follower(36490);
- if(!empty($follower)) {
- //$follower = self::separate_page($follower,$pages);
- $members = Model('member')->field('*')->where(array('member_id' => array('in',$follower)))->limit(false)->select();
- $desc = array();
- foreach ($members as $val) {
- $info = new member_info($val);
- }
- //return self::outsuccess(array('followers' => $follower,'mem_desc' => , 'mobile_page' => mobile_page($pages)));
- }
- }
- public function testDate()
- {
- $title = strftime("熊猫美妆%m月%d日红包风云榜",1469030400);
- }
- }
|