[Security] Add more tests for StringUtils::equals
minor #11808 [Security] Add more tests for StringUtils::equals (dunglas)

This PR was merged into the 2.4 branch.

Discussion
----------

[Security] Add more tests for StringUtils::equals

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

More tests for `StringUtils::equals`.

Commits
-------

a676863 [Security] Add more tests for StringUtils::equals