public function testEmptyIsInvalidIfNoString() { $this->context ->expects($this ->once()) ->method('addViolation'); $this->validator ->validate('', new Type(array( 'type' => 'integer', ))); }