Go to the documentation of this file.
18 use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
34 'match last part of string' => [
'hello world',
'world'],
35 'match last char of string' => [
'hellod world',
'd'],
36 'match whole string' => [
'hello',
'hello'],
37 'integer is part of string with same number' => [
'24', 24],
38 'string is part of integer with same number' => [24,
'24'],
39 'integer is part of string ending with same number' => [
'please gimme beer, 24', 24]
60 'no string match' => [
'hello',
'bye'],
61 'no case sensitive string match' => [
'hello world',
'World'],
62 'string is part but not last part' => [
'hello world',
'worl'],
63 'integer is not part of empty string' => [
'', 0],
64 'longer string is not part of shorter string' => [
'a',
'aa'],
85 'array is not part of string' => [
'string', [], 1347135545],
86 'NULL is not part of string' => [
'string',
null, 1347135545],
87 'empty string is not part of string' => [
'string',
'', 1347135545],
88 'string is not part of array' => [[],
'string', 1347135544],
89 'NULL is not part of array' => [[],
null, 1347135544],
90 'string is not part of NULL' => [
null,
'string', 1347135544],
91 'array is not part of NULL' => [
null, [], 1347135544],
92 'integer is not part of NULL' => [
null, 0, 1347135544],
93 'empty string is not part of NULL' => [
null,
'', 1347135544],
94 'NULL is not part of empty string' => [
'',
null, 1347135545],
95 'FALSE is not part of empty string' => [
'',
false, 1347135545],
96 'empty string is not part of FALSE' => [
false,
'', 1347135545],
97 'empty string is not part of integer' => [0,
'', 1347135545],
98 'string is not part of object' => [new \stdClass(),
'foo', 1347135544],
99 'object is not part of string' => [
'foo', new \stdClass(), 1347135545],
109 $this->expectException(\InvalidArgumentException::class);
110 $this->expectExceptionCode($expectedException);
123 'match first part of string' => [
'hello world',
'hello'],
124 'match first char of string' => [
'hello world',
'h'],
125 'match whole string' => [
'hello',
'hello'],
126 'integer is part of string with same number' => [
'24', 24],
127 'string is part of integer with same number' => [24,
'24'],
128 'integer is part of string starting with same number' => [
'24, please gimme beer', 24],
149 'no string match' => [
'hello',
'bye'],
150 'no case sensitive string match' => [
'hello world',
'Hello'],
151 'string in empty string' => [
'',
'foo']
172 'array is not part of string' => [
'string', [], 1347135547],
173 'NULL is not part of string' => [
'string',
null, 1347135547],
174 'empty string is not part of string' => [
'string',
'', 1347135547],
175 'string is not part of array' => [[],
'string', 1347135546],
176 'NULL is not part of array' => [[],
null, 1347135546],
177 'string is not part of NULL' => [
null,
'string', 1347135546],
178 'array is not part of NULL' => [
null, [], 1347135546],
179 'integer is not part of NULL' => [
null, 0, 1347135546],
180 'empty string is not part of NULL' => [
null,
'', 1347135546],
181 'NULL is not part of empty string' => [
'',
null, 1347135547],
182 'FALSE is not part of empty string' => [
'',
false, 1347135547],
183 'empty string is not part of FALSE' => [
false,
'', 1347135547],
184 'empty string is not part of integer' => [0,
'', 1347135547],
185 'string is not part of object' => [new \stdClass(),
'foo', 1347135546],
186 'object is not part of string' => [
'foo', new \stdClass(), 1347135547],
200 $this->expectException(\InvalidArgumentException::class);
201 $this->expectExceptionCode($expectedException);
212 $this->assertEquals(
'NEW', substr($id, 0, 3));
240 [
'data.field',
'data\\.field'],
241 [
'#theId',
'\\#theId'],
242 [
'.theId:hover',
'\\.theId\\:hover'],
243 [
'.theId:hover',
'\\.theId\\:hover'],
244 [
'input[name=foo]',
'input\\[name\\=foo\\]'],
266 'BOM gets removed' => [
267 'efbbbf424f4d2061742074686520626567696e6e696e6720676574732072656d6f766564',
268 'BOM at the beginning gets removed'
270 'No BOM available' => [
271 '4e6f20424f4d20617661696c61626c65',
295 'Simple wildard single character with *' => [
300 'Simple wildard multiple character with *' => [
305 'Simple wildard multiple character for one placeholder with *' => [
310 'Simple wildard single character with ?' => [
315 'Simple wildard multiple character with ?' => [
320 'Simple wildard multiple character for one placeholder with ?' => [
static bool searchStringWildcard($haystack, $needle)
escapeCssSelector(string $selector, string $expectedValue)
static bool endsWith($haystack, $needle)
endsWithReturnsFalseForNotMatchingLastPart($string, $part)
getUniqueIdReturnsIdWithPrefix()
endsWithReturnsThrowsExceptionWithInvalidArguments($string, $part, $expectedException)
array endsWithReturnsThrowsExceptionWithInvalidArgumentsDataProvider()
removeByteOrderMark(string $input, string $expectedValue)
static string escapeCssSelector(string $selector)
static bool beginsWith($haystack, $needle)
array beginsWithReturnsTrueForMatchingFirstPartDataProvider()
static string removeByteOrderMark(string $input)
endsWithReturnsTrueForMatchingLastPart($string, $part)
array escapeCssSelectorDataProvider()
array searchStringWildcardDataProvider()
array beginsWithReturnsInvalidArgumentDataProvider()
searchStringWildcard($haystack, $needle, $result)
getUniqueIdReturnsIdWithoutDot()
beginsWithReturnsTrueForMatchingFirstPart($string, $part)
array removeByteOrderMarkDataProvider()
array endsWithReturnsTrueForMatchingLastPartDataProvider()
array endsWithReturnsFalseForNotMatchingLastPartDataProvider()
static string getUniqueId($prefix='')
beginsWithReturnsFalseForNotMatchingFirstPart($string, $part)
beginsWithReturnsThrowsExceptionWithInvalidArguments($string, $part, $expectedException)
array beginsWithReturnsFalseForNotMatchingFirstPartDataProvider()