Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Prepend one or more elements to the beginning of an array
<?php array_unshift(array &$array, mixed ...$values): int
<?php                         $view_assertions[] = sprintf('$response->assertViewHas(\'%s\');', $data);

                    }



                    array_unshift($assertions['response'], ...$view_assertions);

                } elseif ($statement instanceof RedirectStatement) {

                    $tested_bits |= self::TESTS_REDIRECT;
<?php                     $assertion .= '));';



                    array_unshift($assertions['response'], $assertion);

                } elseif ($statement instanceof ResourceStatement) {

                    if ($name === 'store') {

                        $assertions['response'][] = '$response->assertCreated();';
<?php                     $tested_bits |= self::TESTS_RESPONDS;



                    if ($statement->content()) {

                        array_unshift($assertions['response'], '$response->assertJson($' . $statement->content() . ');');

                    }



                    if ($statement->status() === 200) {
<?php                     }



                    if ($statement->status() === 200) {

                        array_unshift($assertions['response'], '$response->assertOk();');

                    } elseif ($statement->status() === 204) {

                        array_unshift($assertions['response'], '$response->assertNoContent();');

                    } else {
<?php                     if ($statement->status() === 200) {

                        array_unshift($assertions['response'], '$response->assertOk();');

                    } elseif ($statement->status() === 204) {

                        array_unshift($assertions['response'], '$response->assertNoContent();');

                    } else {

                        array_unshift($assertions['response'], '$response->assertNoContent(' . $statement->status() . ');');

                    }
<?php                     } elseif ($statement->status() === 204) {

                        array_unshift($assertions['response'], '$response->assertNoContent();');

                    } else {

                        array_unshift($assertions['response'], '$response->assertNoContent(' . $statement->status() . ');');

                    }

                } elseif ($statement instanceof SessionStatement) {

                    $assertions['response'][] = sprintf('$response->assertSessionHas(\'%s\', %s);', $statement->reference(), '$' . str_replace('.', '->', $statement->reference()));