public function testWordSafeShortText()
 {
     $this->assertEquals("This is a simple test...", $this->object->wordSafeShortText("This is a simple test case", 24, "..."));
     $this->assertEquals("This is a simple test etc", $this->object->wordSafeShortText("This is a simple test case", 22, " etc"));
     $this->assertEquals("This is a simple test.", $this->object->wordSafeShortText("This is a simple test case", 21, "."));
     $this->assertEquals("The quick brown fox jumps over the lazy dog", $this->object->wordSafeShortText("The quick brown fox jumps over the lazy dog"));
     $this->assertEquals("The lazy fox jumps over the quick brown dog", $this->object->wordSafeShortText("The lazy fox jumps over the quick brown dog", 0));
     $this->assertEquals("This_is_a_simple_test_ca…", $this->object->wordSafeShortText("This_is_a_simple_test_case", 24, "…"));
 }
Beispiel #2
0
 /**
  * @dataProvider shortenDataProvider
  */
 public function testWordSafeShortText($expected, $input1, $input2, $input3)
 {
     $this->assertEquals($expected, $this->object->wordSafeShortText($input1, $input2, $input3));
 }