Neos\Eel\Tests\Unit\ArrayHelperTest::sliceExamples PHP Method

sliceExamples() public method

public sliceExamples ( )
    public function sliceExamples()
    {
        return ['positive begin without end' => [['a', 'b', 'c', 'd', 'e'], 2, null, ['c', 'd', 'e']], 'negative begin without end' => [['a', 'b', 'c', 'd', 'e'], -2, null, ['d', 'e']], 'positive begin and end' => [['a', 'b', 'c', 'd', 'e'], 1, 3, ['b', 'c']], 'positive begin with negative end' => [['a', 'b', 'c', 'd', 'e'], 1, -2, ['b', 'c']], 'zero begin with negative end' => [['a', 'b', 'c', 'd', 'e'], 0, -1, ['a', 'b', 'c', 'd']], 'empty array' => [[], 1, -2, []]];
    }