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