Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

When running test on another machine - there are permission problems

  • Loading branch information...
commit 52b44a2392680b81a296eea9002e1e4d10a07d23 1 parent ae516f0
@fruit authored
View
6 lib/log/sfFileCacheTagLogger.class.php
@@ -49,6 +49,8 @@ public function initialize (array $options = array())
$dir = dirname($file);
+ $umask = umask();
+ umask(0000);
if (! is_dir($dir))
{
mkdir($dir, $this->getOption('dir_mode'), true);
@@ -69,6 +71,8 @@ public function initialize (array $options = array())
{
chmod($file, $this->getOption('file_mode'));
}
+
+ umask($umask);
}
protected function doLog ($char, $key)
@@ -102,4 +106,4 @@ public function shutdown ()
return false;
}
- }
View
4 test/fixtures/project/config/properties.ini
@@ -0,0 +1,4 @@
+[symfony]
+ name=sfCacheTaggingPlugin
+ author=Ilya Sabelnikov <fruit.dev@gmail.com>
+ orm=Doctrine
View
4 test/fixtures/project/lib/filter/doctrine/BaseFormFilterDoctrine.class.php
@@ -3,9 +3,9 @@
/**
* Project filter form base class.
*
- * @package ##PROJECT_NAME##
+ * @package symfony
* @subpackage filter
- * @author ##AUTHOR_NAME##
+ * @author Your name here
* @version SVN: $Id: sfDoctrineFormFilterBaseTemplate.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
*/
abstract class BaseFormFilterDoctrine extends sfFormFilterDoctrine
View
4 test/fixtures/project/lib/form/BaseForm.class.php
@@ -3,9 +3,9 @@
/**
* Base project form.
*
- * @package ##PROJECT_NAME##
+ * @package symfony
* @subpackage form
- * @author ##AUTHOR_NAME##
+ * @author Your name here
* @version SVN: $Id: BaseForm.class.php 20147 2009-07-13 11:46:57Z FabianLange $
*/
class BaseForm extends sfFormSymfony
View
4 test/fixtures/project/lib/form/doctrine/BaseFormDoctrine.class.php
@@ -3,9 +3,9 @@
/**
* Project form base class.
*
- * @package ##PROJECT_NAME##
+ * @package symfony
* @subpackage form
- * @author ##AUTHOR_NAME##
+ * @author Your name here
* @version SVN: $Id: sfDoctrineFormBaseTemplate.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
*/
abstract class BaseFormDoctrine extends sfFormDoctrine
View
13 test/unit/sfFileCacheTagLoggerTest.php
@@ -10,7 +10,7 @@
include_once realpath(dirname(__FILE__) . '/../bootstrap/unit.php');
- define('LOGS_DIR', sfConfig::get('sf_plugins_dir') . '/sfCacheTaggingPlugin/test/temp/logs');
+ define('LOGS_DIR', sfConfig::get('sf_plugins_dir') . '/../../../temp/logs');
define('LOGS_FILE', LOGS_DIR . '/cache.log');
function cleanLogDir()
@@ -62,8 +62,8 @@ function getchmod ($path)
'file' => LOGS_FILE,
));
- $t->is(getchmod(LOGS_FILE), 0640, 'file: -rw-r--r--');
- $t->is(getchmod(LOGS_DIR), 0750, 'dir: -rwxr-x---');
+ $t->is($o = getchmod(LOGS_FILE), $l->getOption('file_mode'), sprintf('file: -rw-r--r--, got %o', $o));
+ $t->is($o = getchmod(LOGS_DIR), $l->getOption('dir_mode'), sprintf('dir: -rwxr-x---, got %o', $o));
cleanLogDir();
@@ -73,8 +73,9 @@ function getchmod ($path)
'dir_mode' => 0770,
));
- $t->is(getchmod(LOGS_FILE), 0610, 'file: -rw-r-----');
- $t->is(getchmod(LOGS_DIR), 0770, 'dir: -rwxrwx---');
+
+ $t->is($o = getchmod(LOGS_FILE), 0610, sprintf('file: -rw-r-----, got %o', $o));
+ $t->is($o = getchmod(LOGS_DIR), 0770, sprintf('dir: -rwxrwx---, got %o', $o));
cleanLogDir();
@@ -125,4 +126,4 @@ function getchmod ($path)
$t->is(fgetc($fp), 'U');
fclose($fp);
- cleanLogDir();
Please sign in to comment.
Something went wrong with that request. Please try again.