protected function setUp() {
if (!class_exists('Symfony\\Component\\HttpFoundation\\File\\UploadedFile')) {
$this
->markTestSkipped('The "HttpFoundation" component is not available');
}
$this->context = $this
->getMock('Symfony\\Component\\Validator\\ExecutionContext', array(), array(), '', false);
$this->validator = new FileValidator();
$this->validator
->initialize($this->context);
$this->path = sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'FileValidatorTest';
$this->file = fopen($this->path, 'w');
}