コード例 #1
0
ファイル: UtilTest.php プロジェクト: aiddroid/utilphp
 public function test_limit_characters()
 {
     $this->assertEquals('The quick brown fox jump...', util::limit_characters('The quick brown fox jumps over the lazy dog', 24));
     $this->assertEquals('The quick brown fox jumps over the lazy dog', util::limit_characters('The quick brown fox jumps over the lazy dog', 55));
     $this->assertEquals('Th...', util::limit_characters('The quick brown fox jumps over the lazy dog', 2));
     $this->assertEquals('The...', util::limit_characters('The quick brown fox jumps over the lazy dog', 3));
     $this->assertEquals('The qui...', util::limit_characters('The quick brown fox jumps over the lazy dog', 7));
     $this->assertEquals('The quick brown fox jumps over the lazy dog', util::limit_characters('The quick brown fox jumps over the lazy dog', 150));
 }