[ticket/9040] Add unit tests for string field

PHPBB3-9040