Modified:
trunk/
trunk/src/testing/AgaviFlowTestCase.class.php
trunk/src/testing/AgaviFragmentTestCase.class.php
trunk/src/testing/AgaviUnitTestCase.class.php
Log:
merge [4897:4898/branches/1.0]
Property changes on: trunk
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/1.0:2658-4896
/branches/config-1.1:4687-4733
/branches/david-azure:4475-4478
/branches/david-numbers:4397-4455
+ /branches/1.0:2658-4898
/branches/config-1.1:4687-4733
/branches/david-azure:4475-4478
/branches/david-numbers:4397-4455
Modified: trunk/src/testing/AgaviFlowTestCase.class.php
===================================================================
--- trunk/src/testing/AgaviFlowTestCase.class.php 2011-12-14 21:51:42 UTC (rev 4898)
+++ trunk/src/testing/AgaviFlowTestCase.class.php 2011-12-14 21:52:56 UTC (rev 4899)
@@ -31,6 +31,11 @@
abstract class AgaviFlowTestCase extends AgaviPhpUnitTestCase implements AgaviIFlowTestCase
{
/**
+ * @var string the name of the context to use, null for default context
+ */
+ protected $contextName = null;
+
+ /**
* @var string the fake routing input
*/
protected $input;
@@ -53,9 +58,17 @@
$this->setRunTestInSeparateProcess(true);
}
+ /**
+ * Return the context defined for this test (or the default one).
+ *
+ * @return AgaviContext The context instance defined for this test.
+ *
+ * @author David Zülke <david....@bitextender.com>
+ * @since 1.0.7
+ */
public function getContext()
{
- return AgaviContext::getInstance();
+ return AgaviContext::getInstance($this->contextName);
}
/**
Modified: trunk/src/testing/AgaviFragmentTestCase.class.php
===================================================================
--- trunk/src/testing/AgaviFragmentTestCase.class.php 2011-12-14 21:51:42 UTC (rev 4898)
+++ trunk/src/testing/AgaviFragmentTestCase.class.php 2011-12-14 21:52:56 UTC (rev 4899)
@@ -30,7 +30,6 @@
*/
abstract class AgaviFragmentTestCase extends AgaviPhpUnitTestCase implements AgaviIFragmentTestCase
{
-
/**
* @var string the name of the context to use, null for default context
*/
@@ -99,10 +98,10 @@
}
/**
- * retrieve the application context
+ * Return the context defined for this test (or the default one).
+ *
+ * @return AgaviContext The context instance defined for this test.
*
- * @return AgaviContext the application context
- *
* @author Felix Gilcher <felix....@bitextender.com>
* @since 1.0.0
*/
Modified: trunk/src/testing/AgaviUnitTestCase.class.php
===================================================================
--- trunk/src/testing/AgaviUnitTestCase.class.php 2011-12-14 21:51:42 UTC (rev 4898)
+++ trunk/src/testing/AgaviUnitTestCase.class.php 2011-12-14 21:52:56 UTC (rev 4899)
@@ -30,8 +30,11 @@
*/
abstract class AgaviUnitTestCase extends AgaviPhpUnitTestCase implements AgaviIUnitTestCase
{
+ /**
+ * @var string the name of the context to use, null for default context
+ */
protected $contextName = null;
-
+
/**
* Constructs a test case with the given name.
*
@@ -44,10 +47,17 @@
parent::__construct($name, $data, $dataName);
$this->setRunTestInSeparateProcess(true);
}
-
+
+ /**
+ * Return the context defined for this test (or the default one).
+ *
+ * @return AgaviContext The context instance defined for this test.
+ *
+ * @author Felix Gilcher <felix....@bitextender.com>
+ * @since 1.0.0
+ */
public function getContext()
{
return AgaviContext::getInstance($this->contextName);
}
-
}
\ No newline at end of file
_______________________________________________
Agavi Commits Mailing List
com...@lists.agavi.org
http://lists.agavi.org/mailman/listinfo/commits