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'); } }
public function test_validatePath_ifPassedDirIsNotAValidDirectoryOrIsNotWriteableDoesNotThrowExceptionIfDisabled() { Validator::$validateWritableDirectory = false; Validator::validatePath('/invalid/directory/12312432423'); Validator::$validateWritableDirectory = true; }