'SYmFOny', 'sYmFOny', false
],
];
} /**
* @dataProvider provideSlice
*/
public function testSlice(string
$expected, string
$origin, int
$start, int
$length = null
) { $this->
assertEquals( static::
createFromString($expected),
static::
createFromString($origin)->
slice($start,
$length) );
} public static function provideSlice() { return [ ['Symfony', 'Symfony is awesome', 0, 7
],
[' ', 'Symfony is awesome', 7, 1
],
['is', 'Symfony is awesome', 8, 2
],
['is awesome', 'Symfony is awesome', 8, null
],
[' ', 'Symfony is awesome', 10, 1
],
[