];
} /**
* @dataProvider provideInvalidChunkLength
*/
public function testInvalidChunkLength(int
$length) { $this->
expectException(InvalidArgumentException::
class);
static::
createFromString('foo|bar|baz'
)->
chunk($length);
} public static function provideInvalidChunkLength(): array
{ return [ [-2
],
[-1
],
[0
],
];
}