public function boot()
 {
     if ($this->container->hasParameter('stof_doctrine_extensions.uploadable.validate_writable_directory')) {
         Validator::$validateWritableDirectory = $this->container->getParameter('stof_doctrine_extensions.uploadable.validate_writable_directory');
     }
 }
예제 #2
0
 public function test_validatePath_ifPassedDirIsNotAValidDirectoryOrIsNotWriteableDoesNotThrowExceptionIfDisabled()
 {
     Validator::$validateWritableDirectory = false;
     Validator::validatePath('/invalid/directory/12312432423');
     Validator::$validateWritableDirectory = true;
 }