public function testGetFirstNChars() { $this->assertEquals('A des..', CommonFunctions::getFirstNChars("A description", 5, '..')); $this->assertEquals('A des', CommonFunctions::getFirstNChars("A description", 5, '')); $this->assertEquals('A des', CommonFunctions::getFirstNChars("A description", 5)); $this->assertEquals('A description', CommonFunctions::getFirstNChars("A description", 25)); $this->assertEquals('A description', CommonFunctions::getFirstNChars("A description", 25, '...')); }