From 619d4acaa26d98c9f36c4df63a70deeff8f07799 Mon Sep 17 00:00:00 2001
From: xamgore <xamgore@ya.ru>
Date: Sun, 21 Jun 2015 13:54:33 +0300
Subject: [PATCH] PHPUnit environment

---
 .../application/tests/classes/Model_Discipline_Test.php  | 9 ++-------
 ~dev_rating/modules/kotwig/classes/Kohana/Twig.php       | 2 +-
 ~dev_rating/system/classes/Kohana/Core.php               | 4 ++--
 ~dev_rating/system/classes/Kohana/Log/File.php           | 8 ++++----
 ~dev_rating/system/composer.json                         | 4 +++-
 5 files changed, 12 insertions(+), 15 deletions(-)

diff --git a/~dev_rating/application/tests/classes/Model_Discipline_Test.php b/~dev_rating/application/tests/classes/Model_Discipline_Test.php
index 7678ec5a3..33949f017 100644
--- a/~dev_rating/application/tests/classes/Model_Discipline_Test.php
+++ b/~dev_rating/application/tests/classes/Model_Discipline_Test.php
@@ -1,11 +1,6 @@
 <?php
 
-class Model_Discipline_Test extends PHPUnit_Framework_TestCase {
-
-    /** @test */
-    function idField() {
-        $d = Model_Discipline::load(1);
-        $this->assertEquals($d->id, 1);
-    }
+class Model_Discipline_Test extends PHPUnit_Framework_TestCase
+{
 
 }
diff --git a/~dev_rating/modules/kotwig/classes/Kohana/Twig.php b/~dev_rating/modules/kotwig/classes/Kohana/Twig.php
index aeec0df20..26db158b7 100644
--- a/~dev_rating/modules/kotwig/classes/Kohana/Twig.php
+++ b/~dev_rating/modules/kotwig/classes/Kohana/Twig.php
@@ -18,7 +18,7 @@ class Kohana_Twig extends View {
 	 */
 	protected static function _init_cache($path)
 	{
-		if (mkdir($path, 0755, TRUE) AND chmod($path, 0755))
+		if (mkdir($path, 0777, TRUE) AND chmod($path, 0777))
 			return TRUE;
 
 		return FALSE;
diff --git a/~dev_rating/system/classes/Kohana/Core.php b/~dev_rating/system/classes/Kohana/Core.php
index 081d4bb05..692a3ce96 100644
--- a/~dev_rating/system/classes/Kohana/Core.php
+++ b/~dev_rating/system/classes/Kohana/Core.php
@@ -252,10 +252,10 @@ class Kohana_Core {
 				try
 				{
 					// Create the cache directory
-					mkdir($settings['cache_dir'], 0755, TRUE);
+					mkdir($settings['cache_dir'], 0777, TRUE);
 
 					// Set permissions (must be manually set to fix umask issues)
-					chmod($settings['cache_dir'], 0755);
+					chmod($settings['cache_dir'], 0777);
 				}
 				catch (Exception $e)
 				{
diff --git a/~dev_rating/system/classes/Kohana/Log/File.php b/~dev_rating/system/classes/Kohana/Log/File.php
index 17235c791..57ed4a29f 100644
--- a/~dev_rating/system/classes/Kohana/Log/File.php
+++ b/~dev_rating/system/classes/Kohana/Log/File.php
@@ -54,10 +54,10 @@ class Kohana_Log_File extends Log_Writer {
 		if ( ! is_dir($directory))
 		{
 			// Create the yearly directory
-			mkdir($directory, 02777);
+			mkdir($directory, 0777);
 
 			// Set permissions (must be manually set to fix umask issues)
-			chmod($directory, 02777);
+			chmod($directory, 0777);
 		}
 
 		// Add the month to the directory
@@ -66,10 +66,10 @@ class Kohana_Log_File extends Log_Writer {
 		if ( ! is_dir($directory))
 		{
 			// Create the monthly directory
-			mkdir($directory, 02777);
+			mkdir($directory, 0777);
 
 			// Set permissions (must be manually set to fix umask issues)
-			chmod($directory, 02777);
+			chmod($directory, 0777);
 		}
 
 		// Set the name of the log file
diff --git a/~dev_rating/system/composer.json b/~dev_rating/system/composer.json
index 2c07aa849..20d6a54af 100644
--- a/~dev_rating/system/composer.json
+++ b/~dev_rating/system/composer.json
@@ -19,7 +19,9 @@
 		"source":   "http://github.com/kohana/core"
 	},
 	"require": {
-		"php":        ">=5.3.3"
+		"php":        ">=5.3.3",
+		"phpunit/phpunit": "4.7.5",
+		"phpunit/dbunit": "1.4.0"
 	},
 	"suggest": {
 		"ext-http":   "*",
-- 
GitLab