示例#1
0
 public function testPlainTwice()
 {
     $string = ' ' . "\r" . "\n" . 'EduSoho网校系统';
     $result = StringToolkit::plain($string, '5');
     //0-5位
     $this->assertEquals($result, 'EduSo...');
 }
 private function simplifyClassroom($classroom)
 {
     return array('id' => $classroom['id'], 'title' => $classroom['title'], 'picture' => $classroom['middlePicture'], 'about' => StringToolkit::plain($classroom['about'], 100), 'price' => $classroom['price']);
 }
 protected function simplifyLesson($lesson)
 {
     return array('id' => $lesson['id'], 'number' => $lesson['number'], 'type' => $lesson['type'], 'title' => $lesson['title'], 'summary' => StringToolkit::plain($lesson['summary'], 100));
 }
 protected function simplifyTestpaperResult($testpaperResult)
 {
     return array('id' => $testpaperResult['id'], 'score' => $testpaperResult['score'], 'objectiveScore' => $testpaperResult['objectiveScore'], 'subjectiveScore' => $testpaperResult['subjectiveScore'], 'teacherSay' => StringToolkit::plain($testpaperResult['teacherSay'], 100), 'passedStatus' => $testpaperResult['passedStatus']);
 }