src/Assert.php
public static function assertHasExactError(
        $document,
        array $error,
        bool $strict = true,
        string $message = ''
    ): void
    {
        self::assertListContainsExact($document, $error, '/errors', $strict, $message);
    }
public static function assertHasExactError(
        $document,
        array $error,
        bool $strict = true,
        string $message = ''
    ): void
    {
        self::assertListContainsExact($document, $error, '/errors', $strict, $message);
    }
Assert the document contains the exact supplied error within its errors member.

@param $document
@param array $error
@param bool $strict
@param string $message
@return void