For testing, I want to use the validator method to validate the size and minimum size of this passwordsArray:
array:9 [
0 => "password 0"
1 => "password 1"
2 => "password 2"
3 => "password 3"
4 => "password 4"
5 => "password 5"
]
I'm trying something like:
$validator = Validator::make($passwordsArray, [
'passwordsArray' => 'required|min:6',
]);
if( $validator->passes() ){
$this->assertTrue(true);
}else{
$this->assertTrue(false);
}
I'm getting this error:
Failed asserting that false is true.
Help is appreciated, thanks :)