src/HelperTrait.php
public static function assertInArray($needle, array $haystack, string $msg = '')
    {
        if ($msg === '') {
            $msg = "Expected the array to contain the element '$needle'.";
        }

        static::assertTrue(in_array($needle, $haystack, true), $msg);
    }
public static function assertInArray($needle, array $haystack, string $msg = '')
    {
        if ($msg === '') {
            $msg = "Expected the array to contain the element '$needle'.";
        }

        static::assertTrue(in_array($needle, $haystack, true), $msg);
    }
public static function assertInArray ( $ needle , array $ haystack , string $ msg = '' ) { if ( $ msg === '' ) { $ msg = "Expected the array to contain the element '$needle'." ; } static :: assertTrue ( in_array ( $ needle , $ haystack , true ) , $ msg ) ; }
Assert that the element exists in the array.

@param mixed  $needle
@param array  $haystack
@param string $msg

@return void
Assert that the element exists in the array .