Example #1
0
 /**
  * Test {@link HTMLText->LimitCharacters()}
  */
 public function testLimitCharacters()
 {
     $cases = array('The little brown fox jumped over the lazy cow.' => 'The little brown fox...', '<p>This is some text in a paragraph.</p>' => 'This is some text in...', 'This text contains &amp; in it' => 'This text contains &amp;...');
     foreach ($cases as $originalValue => $expectedValue) {
         $textObj = new HTMLText('Test');
         $textObj->setValue($originalValue);
         $this->assertEquals($expectedValue, $textObj->LimitCharacters());
     }
 }