@expectedException \Symfony\Component\Validator\Exception\UnexpectedTypeException
public function testExpectsStringCompatibleType() { $this->validator ->validate(new \stdClass(), new Regex(array( 'pattern' => '/^[0-9]+$/', ))); }