예제 #1
0
파일: TextTest.php 프로젝트: tourze/base
 /**
  * 测试[Text::params]
  *
  * @dataProvider dataParams
  * @param mixed $input
  * @param mixed $expected
  */
 public function testParams($input, $expected)
 {
     $this->assertEquals($expected, Text::params($input));
 }
예제 #2
0
파일: Http.php 프로젝트: rockefys/server
 /**
  * 生成一个随机会话ID
  *
  * @return string
  */
 public static function generateSession()
 {
     $sessionID = TextHelper::random(20, 'qwertyuiopasdfghjklzxcvbnm1234567890');
     Base::getLog()->debug(__METHOD__ . ' generate session id', ['id' => $sessionID]);
     return $sessionID;
 }