1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- <?php
- /**
- * Created by PhpStorm.
- * User: stanley-king
- * Date: 2016/12/24
- * Time: 下午3:58
- */
- define('BASE_ROOT_PATH',str_replace('/test','',dirname(__FILE__)));
- require_once (BASE_ROOT_PATH . '/fooder.php');
- require_once (BASE_ROOT_PATH . '/helper/util_helper.php');
- class redisTest extends PHPUnit_Framework_TestCase
- {
- public static function setUpBeforeClass()
- {
- Base::run_util();
- }
- public function testIncr()
- {
- for ($i = 0; $i < 300; ++$i) {
- $x = util::mem_no();
- printf("%d \r\n",$x);
- }
- }
- public function testMember()
- {
- $mod = Model('member');
- $mobile = $mod->getMemberInfoByID(36490,'member_no');
- }
- public function testGetgid()
- {
- $url = 'http://images.shobserver.com/news/news/2016/12/24/0370ef86-7cea-4094-bfd4-2d6a284f8bf8.jpg?goods_id=3000';
- $exp = '/goods_id=(\d{1,9})$/';
- $x = preg_match_all($exp, $url, $match);
- }
- public static function tearDownAfterClass()
- {
- }
- }
|