Пример #1
0
 /**
  * 测试[Text::params]
  *
  * @dataProvider dataParams
  * @param mixed $input
  * @param mixed $expected
  */
 public function testParams($input, $expected)
 {
     $this->assertEquals($expected, Text::params($input));
 }
Пример #2
0
 /**
  * 生成一个随机会话ID
  *
  * @return string
  */
 public static function generateSession()
 {
     $sessionID = TextHelper::random(20, 'qwertyuiopasdfghjklzxcvbnm1234567890');
     Base::getLog()->debug(__METHOD__ . ' generate session id', ['id' => $sessionID]);
     return $sessionID;
 }