public function testInvalidAndRequiredOptionsPassed() { $this ->setExpectedException('Symfony\\Component\\Validator\\Exception\\InvalidOptionsException'); new ConstraintC(array( 'option1' => 'default', 'foo' => 'bar', )); }