单元测试修正

This commit is contained in:
thinkphp
2016-07-13 21:22:13 +08:00
parent f8143dcdb2
commit 4a1474bacf
4 changed files with 6 additions and 6 deletions

View File

@@ -73,7 +73,7 @@ class Build
foreach ($list as $file) { foreach ($list as $file) {
if (!is_dir(APP_PATH . dirname($file))) { if (!is_dir(APP_PATH . dirname($file))) {
// 创建目录 // 创建目录
mkdir(APP_PATH . dirname($file), 0666, true); mkdir(APP_PATH . dirname($file), 0755, true);
} }
if (!is_file(APP_PATH . $file)) { if (!is_file(APP_PATH . $file)) {
file_put_contents(APP_PATH . $file, 'php' == pathinfo($file, PATHINFO_EXTENSION) ? "<?php\n" : ''); file_put_contents(APP_PATH . $file, 'php' == pathinfo($file, PATHINFO_EXTENSION) ? "<?php\n" : '');
@@ -118,7 +118,7 @@ class Build
foreach ($file as $dir) { foreach ($file as $dir) {
if (!is_dir($modulePath . $dir)) { if (!is_dir($modulePath . $dir)) {
// 创建目录 // 创建目录
mkdir($modulePath . $dir, 0644, true); mkdir($modulePath . $dir, 0755, true);
} }
} }
} elseif ('__file__' == $path) { } elseif ('__file__' == $path) {
@@ -146,7 +146,7 @@ class Build
$filename = $modulePath . $path . DS . $val . '.html'; $filename = $modulePath . $path . DS . $val . '.html';
if (!is_dir(dirname($filename))) { if (!is_dir(dirname($filename))) {
// 创建目录 // 创建目录
mkdir(dirname($filename), 0644, true); mkdir(dirname($filename), 0755, true);
} }
$content = ''; $content = '';
break; break;

View File

@@ -79,7 +79,7 @@ class File extends SplFileObject
return true; return true;
} }
if (mkdir($path, 0666, true)) { if (mkdir($path, 0755, true)) {
return true; return true;
} else { } else {
$this->error = "目录 {$path} 创建失败!"; $this->error = "目录 {$path} 创建失败!";

View File

@@ -25,7 +25,7 @@ class Make extends Command
} }
if (!is_dir(dirname($file))) { if (!is_dir(dirname($file))) {
mkdir(strtolower(dirname($file)), 0644, true); mkdir(strtolower(dirname($file)), 0755, true);
} }
file_put_contents($file, $content); file_put_contents($file, $content);

View File

@@ -26,7 +26,7 @@ class File
// 检测模板目录 // 检测模板目录
$dir = dirname($cacheFile); $dir = dirname($cacheFile);
if (!is_dir($dir)) { if (!is_dir($dir)) {
mkdir($dir, 0666, true); mkdir($dir, 0755, true);
} }
// 生成模板缓存文件 // 生成模板缓存文件
if (false === file_put_contents($cacheFile, $content)) { if (false === file_put_contents($cacheFile, $content)) {