[limb-svn] r6066 - in 3.x/trunk/limb/tests_runner: src tests
svn at limb-project.com
svn at limb-project.com
Wed Jul 4 15:19:58 MSD 2007
Author: pachanga
Date: 2007-07-04 15:19:58 +0400 (Wed, 04 Jul 2007)
New Revision: 6066
URL: http://fisheye.limb-project.com/changelog/limb/?cs=6066
Modified:
3.x/trunk/limb/tests_runner/src/lmbTestGroup.class.php
3.x/trunk/limb/tests_runner/src/lmbTestTreeNode.class.php
3.x/trunk/limb/tests_runner/src/lmbTestTreeShallowDirNode.class.php
3.x/trunk/limb/tests_runner/tests/test_self.php
Log:
-- fixture setup happes in lmbTestGroup :: useFixture(), this allows to get rid of .init.php at all in favor of .setup.php
Modified: 3.x/trunk/limb/tests_runner/src/lmbTestGroup.class.php
===================================================================
--- 3.x/trunk/limb/tests_runner/src/lmbTestGroup.class.php 2007-07-04 10:35:31 UTC (rev 6065)
+++ 3.x/trunk/limb/tests_runner/src/lmbTestGroup.class.php 2007-07-04 11:19:58 UTC (rev 6066)
@@ -1,18 +1,18 @@
<?php
-/*
- * Limb PHP Framework
- *
- * @link http://limb-project.com
- * @copyright Copyright © 2004-2007 BIT(http://bit-creative.com)
- * @license LGPL http://www.gnu.org/copyleft/lesser.html
- */
-
+/*
+ * Limb PHP Framework
+ *
+ * @link http://limb-project.com
+ * @copyright Copyright © 2004-2007 BIT(http://bit-creative.com)
+ * @license LGPL http://www.gnu.org/copyleft/lesser.html
+ */
+
/**
* class lmbTestGroup.
*
* @package tests_runner
* @version $Id$
- */
+ */
class lmbTestGroup extends TestSuite
{
protected $_fixture;
@@ -21,12 +21,11 @@
function useFixture($fixture)
{
$this->_fixture = $fixture;
+ $this->_setUpFixture();
}
function run($reporter)
{
- $this->_setUpFixture();
-
$res = parent :: run($reporter);
$this->_tearDownFixture();
Modified: 3.x/trunk/limb/tests_runner/src/lmbTestTreeNode.class.php
===================================================================
--- 3.x/trunk/limb/tests_runner/src/lmbTestTreeNode.class.php 2007-07-04 10:35:31 UTC (rev 6065)
+++ 3.x/trunk/limb/tests_runner/src/lmbTestTreeNode.class.php 2007-07-04 11:19:58 UTC (rev 6066)
@@ -101,7 +101,7 @@
function createTestCase()
{
$test = $this->_doCreateTestCase();
- $children = $this->getChildren();//getter instead of raw property, since child classes may need customization
+ $children = $this->getChildren();//using getter instead of raw property, since child classes may need customization
foreach($children as $child)
{
if($child->isSkipped())
Modified: 3.x/trunk/limb/tests_runner/src/lmbTestTreeShallowDirNode.class.php
===================================================================
--- 3.x/trunk/limb/tests_runner/src/lmbTestTreeShallowDirNode.class.php 2007-07-04 10:35:31 UTC (rev 6065)
+++ 3.x/trunk/limb/tests_runner/src/lmbTestTreeShallowDirNode.class.php 2007-07-04 11:19:58 UTC (rev 6066)
@@ -43,15 +43,14 @@
return false;
}
-
function getDir()
{
return $this->dir;
}
-
function init()
{
+ //deprecated
if(file_exists($this->dir . '/.init.php'))
include_once($this->dir . '/.init.php');
}
@@ -83,7 +82,7 @@
if(file_exists($this->dir . '/.skipif.php'))
$this->skipped = (bool)include($this->dir . '/.skipif.php');
- elseif(file_exists($this->dir . '/.ignore.php'))
+ elseif(file_exists($this->dir . '/.ignore.php'))//deprecated
$this->skipped = (bool)include($this->dir . '/.ignore.php');
else
$this->skipped = false;
Modified: 3.x/trunk/limb/tests_runner/tests/test_self.php
===================================================================
--- 3.x/trunk/limb/tests_runner/tests/test_self.php 2007-07-04 10:35:31 UTC (rev 6065)
+++ 3.x/trunk/limb/tests_runner/tests/test_self.php 2007-07-04 11:19:58 UTC (rev 6066)
@@ -10,7 +10,7 @@
if(isset($argv[1]))
define('SIMPLE_TEST', $argv[1]);
-require_once(dirname(__FILE__) . '/cases/.init.php');
+require_once(dirname(__FILE__) . '/cases/.setup.php');
$group = new TestSuite();
foreach(glob(dirname(__FILE__) . '/cases/*Test.class.php') as $file)
More information about the limb-svn
mailing list