[TASK] Add missing unit test for enumeration

Add unit test that checks if the constructor throws
an exception if an invalid value is requested.

Resolves: #60572
Releases: 6.3, 6.2
Change-Id: I2179414f94bbd6465c5b780c71dfed3c91e71776
Reviewed-on: http://review.typo3.org/31819
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>