add configuration tests and fix a bug

solve #40

adding lots of testing on the configuration with the help of matthiasnoback/symfony-dependency-injection-test

for now leaving out xml testing, as there are issues. will do a follow-up PR but hope we can merge this fast as it fixes a bug.
even though its called validate, we still would need to return the value here, or we null it. i found another solution below