This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "quickfw".
The branch, master has been updated
via eb873926560f1f28840e97f3de9151cfc7d29824 (commit)
via 353796aa4d12f7bc3417377da875ab2832a51e07 (commit)
via 0a7654972190807d46ccf236554f922b64c1e99c (commit)
from 544d5db1fa7a0a5f7fddfc263748667985345b65 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit eb873926560f1f28840e97f3de9151cfc7d29824
Author: Ivan1986 <iva...@li...>
Date: Wed Jun 30 17:50:03 2010 +0400
Правки тестов
diff --git a/tests/DbSimple/DbSimpleTest.php b/tests/DbSimple/DbSimpleTest.php
index c754d5f..9b37f8b 100644
--- a/tests/DbSimple/DbSimpleTest.php
+++ b/tests/DbSimple/DbSimpleTest.php
@@ -6,7 +6,7 @@ class DbSimpleTest extends PHPUnit_Framework_TestCase
protected function setUp()
{
- $this->db = new QuickFW_AutoDbSimple(DSN);
+ $this->db = new DbSimple_Connect(DSN);
$this->db->setErrorHandler(false, false);
}
diff --git a/tests/DbSimple/DbSimpleTests.php b/tests/DbSimple/DbSimpleTests.php
index ba42124..bf8a9db 100644
--- a/tests/DbSimple/DbSimpleTests.php
+++ b/tests/DbSimple/DbSimpleTests.php
@@ -16,7 +16,7 @@ class DbSimpleTests
$suite->addTestFile($base.'/DbSimpleTest.php');
$suite->addTestFile($base.'/MysqlTest.php');
$suite->addTestFile($base.'/MypdoTest.php');
- $suite->addTestFile($base.'/PgsqlTest.php');
+ //$suite->addTestFile($base.'/PgsqlTest.php');
return $suite;
}
diff --git a/tests/DbSimple/MypdoTest.php b/tests/DbSimple/MypdoTest.php
index cea66cc..4dfda1f 100644
--- a/tests/DbSimple/MypdoTest.php
+++ b/tests/DbSimple/MypdoTest.php
@@ -8,7 +8,7 @@ class MypdoTest extends GenericDbSimpleTestClass
{
protected function setUp()
{
- $this->db = new QuickFW_AutoDbSimple(DSNMYPDO);
+ $this->db = new DbSimple_Connect(DSNMYPDO);
$this->db->setErrorHandler(false, false);
}
diff --git a/tests/DbSimple/MysqlTest.php b/tests/DbSimple/MysqlTest.php
index ecec3fb..49d965b 100644
--- a/tests/DbSimple/MysqlTest.php
+++ b/tests/DbSimple/MysqlTest.php
@@ -8,7 +8,7 @@ class MysqlTest extends GenericDbSimpleTestClass
{
protected function setUp()
{
- $this->db = new QuickFW_AutoDbSimple(DSNMY);
+ $this->db = new DbSimple_Connect(DSNMY);
$this->db->setErrorHandler(false, false);
}
diff --git a/tests/DbSimple/PgsqlTest.php b/tests/DbSimple/PgsqlTest.php
index 2e6bf70..cbf31f9 100644
--- a/tests/DbSimple/PgsqlTest.php
+++ b/tests/DbSimple/PgsqlTest.php
@@ -7,7 +7,7 @@ class PgsqlTest extends PHPUnit_Framework_TestCase
protected $pg;
protected function setUp()
{
- $this->pg = new QuickFW_AutoDbSimple(DSNPG);
+ $this->pg = new DbSimple_Connect(DSNPG);
$this->pg->setErrorHandler(false, false);
}
diff --git a/tests/QFW/QFWTest.php b/tests/QFW/QFWTest.php
index 8b0c04b..5e8b459 100644
--- a/tests/QFW/QFWTest.php
+++ b/tests/QFW/QFWTest.php
@@ -5,9 +5,7 @@ class QFWTest extends PHPUnit_Framework_TestCase
public function testInitTime()
{
global $InitTime;
- //Вообще должно выдавать меньше 0.05 но из-за
- //включенного дебага и отладки недотягивает
- //$this->assertLessThanOrEqual(0.05,$InitTime);
+ $this->assertLessThanOrEqual(0.01, $InitTime);
unset($GLOBALS['InitTime']);
}
@@ -27,7 +25,7 @@ class QFWTest extends PHPUnit_Framework_TestCase
array('ddd/bbb/fff', 'ddd/bbb/fff'),
array('ddd/eee/ccc', 'ddd/eee'),
array('ddd/eee/fff', 'ddd/eee/fff'),
- array('aaa/bbb', 'bbb'),
+ array('aaa/bbb', ''),
array('aaa/eee', 'eee'),
array('ddd/bbb', 'ddd/bbb'),
array('ddd/eee', 'ddd/eee'),
@@ -41,7 +39,7 @@ class QFWTest extends PHPUnit_Framework_TestCase
array('eee/fff', 'eee/fff'),
array('aaa', ''),
array('ddd', 'ddd'),
- array('bbb', 'bbb'),
+ array('bbb', ''),
array('eee', 'eee'),
array('ccc', ''),
array('fff', 'fff'),
@@ -53,7 +51,7 @@ class QFWTest extends PHPUnit_Framework_TestCase
*
* Тестирование delDef
*/
- public function testDdef($in,$out)
+ public function testDdef($in, $out)
{
QFW::Init();
QFW::$config['default']['module'] = 'aaa';
diff --git a/tests/QFWTests.php b/tests/QFWTests.php
index 79027ea..2a355af 100644
--- a/tests/QFWTests.php
+++ b/tests/QFWTests.php
@@ -10,7 +10,7 @@
$_SERVER['HTTP_HOST'] = 'test';
$InitTime = microtime(true);
- require (QFWPATH.'/Init.php');
+ require_once (QFWPATH.'/Init.php');
$InitTime = microtime(true) - $InitTime;
chdir(dirname(__FILE__));
@@ -23,7 +23,7 @@
$suite->addTestFile('DbSimple/DbSimpleTests.php');
$suite->addTestFile('Cache/CacheTest.php');
- $suite->addTestFile('Smarty/SmartyTest.php');
+ //$suite->addTestFile('Smarty/SmartyTest.php');
$suite->addTestFile('QFW/FrameworkTests.php');
return $suite;
diff --git a/tests/testapp/default.php b/tests/testapp/default.php
index 15c5adc..071719b 100644
--- a/tests/testapp/default.php
+++ b/tests/testapp/default.php
@@ -1,3 +1,6 @@
<?php
+$config['host']['encoding'] = '';
+
+
?>
\ No newline at end of file
commit 353796aa4d12f7bc3417377da875ab2832a51e07
Author: Ivan1986 <iva...@li...>
Date: Wed Jun 30 17:49:37 2010 +0400
requeire заменил на requere_once
diff --git a/QFW/Init.php b/QFW/Init.php
index 3078def..c1b108c 100644
--- a/QFW/Init.php
+++ b/QFW/Init.php
@@ -56,32 +56,32 @@ class QFW
{
self::$config = self::config();
- require QFWPATH.'/QuickFW/Cache.php';
- require QFWPATH.'/QuickFW/Plugs.php';
+ require_once QFWPATH.'/QuickFW/Cache.php';
+ require_once QFWPATH.'/QuickFW/Plugs.php';
//выставляем заголовок с нужной кодировкой
if (!empty(self::$config['host']['encoding']))
header("Content-Type: text/html; charset=".self::$config['host']['encoding']);
//Инициализируем класс базы данных
- require LIBPATH.'/DbSimple/Connect.php';
+ require_once LIBPATH.'/DbSimple/Connect.php';
self::$db = new DbSimple_Connect(self::$config['database']);
//Подключаем шаблонизатор
$templ = ucfirst(self::$config['templater']['name']);
$class = 'Templater_'.$templ;
- require QFWPATH.'/Templater/'.$templ.'.php';
+ require_once QFWPATH.'/Templater/'.$templ.'.php';
self::$view = new $class(APPPATH,
isset(self::$config['templater']['def_tpl']) ? self::$config['templater']['def_tpl'] : '');
//подключаем модули и библиотеки
self::modules();
- require QFWPATH.'/QuickFW/Router.php';
+ require_once QFWPATH.'/QuickFW/Router.php';
self::$router = new QuickFW_Router(APPPATH);
//хелпер для урлов (зависит от QuickFW_Router)
- require QFWPATH.'/QuickFW/Url.php';
+ require_once QFWPATH.'/QuickFW/Url.php';
Url::Init();
}
@@ -102,7 +102,7 @@ class QFW
//автолоад
if (!empty(self::$config['QFW']['autoload']))
{
- require QFWPATH.'/QuickFW/Autoload.php';
+ require_once QFWPATH.'/QuickFW/Autoload.php';
Autoload::Init(self::$config['QFW']['autoload']);
}
commit 0a7654972190807d46ccf236554f922b64c1e99c
Author: Ivan1986 <iva...@li...>
Date: Wed Jun 30 17:48:39 2010 +0400
Варнинг - call_user_func_array - второй параметр был строкой
diff --git a/lib/DbSimple/Generic.php b/lib/DbSimple/Generic.php
index 8a4e388..5345d55 100644
--- a/lib/DbSimple/Generic.php
+++ b/lib/DbSimple/Generic.php
@@ -448,7 +448,7 @@ abstract class DbSimple_Generic_Database extends DbSimple_Generic_LastError
$dummy = null;
// There is no need in query, cos' needle in $this->attributes['CACHE']
$this->_transformQuery($dummy, 'UNIQ_KEY');
- $uniq_key = call_user_func_array(array(&$this, 'select'), $dummy);
+ $uniq_key = call_user_func_array(array(&$this, 'select'), array($dummy));
$uniq_key = md5(serialize($uniq_key));
}
// Check TTL?
-----------------------------------------------------------------------
Summary of changes:
QFW/Init.php | 14 +++++++-------
lib/DbSimple/Generic.php | 2 +-
tests/DbSimple/DbSimpleTest.php | 2 +-
tests/DbSimple/DbSimpleTests.php | 2 +-
tests/DbSimple/MypdoTest.php | 2 +-
tests/DbSimple/MysqlTest.php | 2 +-
tests/DbSimple/PgsqlTest.php | 2 +-
tests/QFW/QFWTest.php | 10 ++++------
tests/QFWTests.php | 4 ++--
tests/testapp/default.php | 3 +++
10 files changed, 22 insertions(+), 21 deletions(-)
hooks/post-receive
--
quickfw
|