array_fill
laravel/framework
Supported Versions: PHP 4 >= 4.2.0, PHP 5, PHP 7, PHP 8
Fill an array with values
array_fill
(
int $start_index
,
int $count
,
mixed $value
): array
return
array_map
(
[
$this
,
'prepareRule'
],
$rule
,
array_fill
((int)
array_key_first
(
$rule
),
count
(
$rule
),
$attribute
)
);
}
src/Illuminate/Validation/ValidationRuleParser.php
$builder
->
shouldReceive
(
'take'
)->
andReturnSelf
();
$builder
->
shouldReceive
(
'get'
)->
andReturn
(
collect
(
array_fill
(
0
,
3
,
'data'
))
);
$this
->
assertDatabaseHas
(
$this
->
table
,
$this
->
data
);
tests/Foundation/FoundationInteractsWithDatabaseTest.php