Esempio n. 1
0
 /**
  *
  */
 public function testLimitWords()
 {
     $this->assertEquals(trim(str_repeat('Hello ', 50)), Str::limitWords(trim(str_repeat('Hello ', 50))));
     $this->assertEquals(trim(str_repeat('Hello ', 100)) . '...', Str::limitWords(trim(str_repeat('Hello ', 200))));
     $this->assertEquals(trim(str_repeat('Hello ', 40)) . '...', Str::limitWords(trim(str_repeat('Hello ', 50)), 40));
     $this->assertEquals(trim(str_repeat('Hello ', 40)) . ',,,', Str::limitWords(trim(str_repeat('Hello ', 50)), 40, ',,,'));
 }