Author: ts
Date: Thu Sep 27 19:01:56 2007
New Revision: 6303
Log:
- Updated test environment handling.
Modified:
trunk/Webdav/tests/client_test.php
trunk/Webdav/tests/client_test_backend_continuous.php
trunk/Webdav/tests/client_test_rfc_backend.php
Modified: trunk/Webdav/tests/client_test.php
==============================================================================
--- trunk/Webdav/tests/client_test.php [iso-8859-1] (original)
+++ trunk/Webdav/tests/client_test.php [iso-8859-1] Thu Sep 27 19:01:56 2007
@@ -5,7 +5,7 @@
abstract class ezcWebdavClientTest extends ezcTestCase
{
const REGENERATE_REQUEST = false;
- const REGENERATE_RESPONSE = true;
+ const REGENERATE_RESPONSE = false;
protected $setupClass;
@@ -18,6 +18,8 @@
private $testSets = array();
private $currentTestSet;
+
+ private $reset = false;
/**
* Needs to set different options.
@@ -35,6 +37,8 @@
parent::__construct();
$this->setupTestEnvironment();
+ // Reset the backend at start of the suite
+
foreach ( glob( $this->dataDir . '/*', GLOB_ONLYDIR ) as $testSetDir )
{
$this->testSets[] = $testSetDir;
@@ -64,7 +68,7 @@
protected function runTestSet( $testSetName )
{
- call_user_func( array( $this->setupClass, 'performSetup' ), $this,
basename( $testSetName ) );
+ call_user_func( array( $this->setupClass, 'performSetup' ), $this,
$testSetName );
$requestObject = null;
Modified: trunk/Webdav/tests/client_test_backend_continuous.php
==============================================================================
--- trunk/Webdav/tests/client_test_backend_continuous.php [iso-8859-1]
(original)
+++ trunk/Webdav/tests/client_test_backend_continuous.php [iso-8859-1] Thu Sep
27 19:01:56 2007
@@ -6,16 +6,16 @@
protected static $backend;
+ protected static $lastTestSuite;
+
public static function performSetup( ezcWebdavClientTest $test,
$testSetName )
{
- if ( self::$transport === null )
+ if ( basename( dirname( $testSetName ) ) !== self::$lastTestSuite )
{
- self::$transport = new ezcWebdavTransportTestMock();
+ self::$lastTestSuite = basename( dirname(
$testSetName ) );
+ self::$transport = new
ezcWebdavTransportTestMock();
self::$transport->options->pathFactory = new ezcWebdavPathFactory(
'http://webdav' );
- }
- if ( self::$backend === null )
- {
- self::$backend = self::setupBackend();
+ self::$backend = self::setupBackend();
}
$test->transport = self::$transport;
$test->backend = self::$backend;
Modified: trunk/Webdav/tests/client_test_rfc_backend.php
==============================================================================
--- trunk/Webdav/tests/client_test_rfc_backend.php [iso-8859-1] (original)
+++ trunk/Webdav/tests/client_test_rfc_backend.php [iso-8859-1] Thu Sep 27
19:01:56 2007
@@ -4,6 +4,9 @@
{
public static function performSetup( ezcWebdavClientTest $test,
$testSetName )
{
+ // Compat
+ $testSetName = basename( $testSetName );
+
$test->transport = new ezcWebdavTransportTestMock();
$test->transport->options->pathFactory = new ezcWebdavPathFactory(
'http://www.foo.bar' );
@@ -40,6 +43,11 @@
}
}
+ public static function reset()
+ {
+
+ }
+
protected static function getFooBarSetup1( ezcWebdavClientTest $test )
{
--
svn-components mailing list
[email protected]
http://lists.ez.no/mailman/listinfo/svn-components