Neos\Eel\Tests\Unit\StringHelperTest::cropExamples PHP Метод

cropExamples() публичный Метод

public cropExamples ( )
    public function cropExamples()
    {
        return ['standard options' => ['methodName' => 'crop', 'maximumCharacters' => 18, 'suffixString' => '...', 'text' => 'Kasper Skårhøj implemented the original version of the crop function.', 'expected' => 'Kasper Skårhøj imp...'], 'crop at word' => ['methodName' => 'cropAtWord', 'maximumCharacters' => 18, 'suffixString' => '...', 'text' => 'Kasper Skårhøj implemented the original version of the crop function.', 'expected' => 'Kasper Skårhøj ...'], 'crop at sentence' => ['methodName' => 'cropAtSentence', 'maximumCharacters' => 80, 'suffixString' => '...', 'text' => 'Kasper Skårhøj implemented the original version of the crop function. But now we are using a TextIterator. Not too bad either.', 'expected' => 'Kasper Skårhøj implemented the original version of the crop function. ...'], 'prefixCanBeChanged' => ['methodName' => 'crop', 'maximumCharacters' => 15, 'suffixString' => '!', 'text' => 'Kasper Skårhøj implemented the original version of the crop function.', 'expected' => 'Kasper Skårhøj !'], 'subject is not modified if run without options' => ['methodName' => 'crop', 'maximumCharacters' => null, 'suffixString' => null, 'text' => 'Kasper Skårhøj implemented the original version of the crop function.', 'expected' => 'Kasper Skårhøj implemented the original version of the crop function.']];
    }