Author: kn
Date: Thu Sep 20 17:15:17 2007
New Revision: 6228

Log:
- Reactivated all tests
  # Only 5 are still failing ...

Modified:
    trunk/Webdav/src/backend/file.php
    trunk/Webdav/tests/backend_file_test.php

Modified: trunk/Webdav/src/backend/file.php
==============================================================================
--- trunk/Webdav/src/backend/file.php [iso-8859-1] (original)
+++ trunk/Webdav/src/backend/file.php [iso-8859-1] Thu Sep 20 17:15:17 2007
@@ -146,6 +146,7 @@
         // exists, which we need to silence using the @
         while ( ( $fp = @fopen( $lockFileName, 'x' ) ) === false )
         {
+            echo ' - ';
             usleep( $sleeptime );
         }
 
@@ -412,7 +413,7 @@
             foreach ( glob( $dir . '/*.xml' ) as $file )
             {
                 $storage->attach( 
-                    unserialize( file_get_contents( $storage ) )
+                    unserialize( file_get_contents( $file ) )
                 );
             }
         }
@@ -646,8 +647,10 @@
     public function get( ezcWebdavGetRequest $request )
     {
         $this->acquireLock( true );
-        return parent::get( $request );
+        $return = parent::get( $request );
         $this->freeLock();
+
+        return $return;
     }
 
     /**
@@ -664,8 +667,10 @@
     public function head( ezcWebdavHeadRequest $request )
     {
         $this->acquireLock( true );
-        return parent::head( $request );
+        $return = parent::head( $request );
         $this->freeLock();
+
+        return $return;
     }
 
     /**
@@ -685,8 +690,10 @@
     public function propFind( ezcWebdavPropFindRequest $request )
     {
         $this->acquireLock( true );
-        return parent::propFind( $request );
+        $return = parent::propFind( $request );
         $this->freeLock();
+
+        return $return;
     }
 
     /**
@@ -703,8 +710,10 @@
     public function propPatch( ezcWebdavPropPatchRequest $request )
     {
         $this->acquireLock();
-        return parent::propPatch( $request );
+        $return = parent::propPatch( $request );
         $this->freeLock();
+
+        return $return;
     }
 
     /**
@@ -721,8 +730,10 @@
     public function put( ezcWebdavPutRequest $request )
     {
         $this->acquireLock();
-        return parent::put( $request );
+        $return = parent::put( $request );
         $this->freeLock();
+
+        return $return;
     }
 
     /**
@@ -739,8 +750,10 @@
     public function delete( ezcWebdavDeleteRequest $request )
     {
         $this->acquireLock();
-        return parent::delete( $request );
+        $return = parent::delete( $request );
         $this->freeLock();
+
+        return $return;
     }
 
     /**
@@ -757,8 +770,10 @@
     public function copy( ezcWebdavCopyRequest $request )
     {
         $this->acquireLock();
-        return parent::copy( $request );
+        $return = parent::copy( $request );
         $this->freeLock();
+
+        return $return;
     }
 
     /**
@@ -775,8 +790,10 @@
     public function move( ezcWebdavMoveRequest $request )
     {
         $this->acquireLock();
-        return parent::move( $request );
+        $return = parent::move( $request );
         $this->freeLock();
+
+        return $return;
     }
 
     /**
@@ -793,8 +810,10 @@
     public function makeCollection( ezcWebdavMakeCollectionRequest $request )
     {
         $this->acquireLock();
-        return parent::makeCollection( $request );
+        $return = parent::makeCollection( $request );
         $this->freeLock();
+
+        return $return;
     }
 }
 

Modified: trunk/Webdav/tests/backend_file_test.php
==============================================================================
--- trunk/Webdav/tests/backend_file_test.php [iso-8859-1] (original)
+++ trunk/Webdav/tests/backend_file_test.php [iso-8859-1] Thu Sep 20 17:15:17 
2007
@@ -217,54 +217,7 @@
             20
         );
     }
-/*
-    public function testResourceGetWithProperties()
-    {
-        $backend = new ezcWebdavFileBackend( $this->tempDir . 'backend/' );
-
-        // Expected properties
-        $propertyStorage = new ezcWebdavPropertyStorage();
-        $propertyStorage->attach(
-            new ezcWebdavCreationDateProperty( new DateTime( '@1054034820' ) )
-        );
-        $propertyStorage->attach(
-            new ezcWebdavDisplayNameProperty( 'foo' )
-        );
-        $propertyStorage->attach(
-            new ezcWebdavGetContentLanguageProperty( array( 'en' ) )
-        );
-        $propertyStorage->attach(
-            new ezcWebdavGetContentTypeProperty( 'application/octet-stream' )
-        );
-        $propertyStorage->attach(
-            new ezcWebdavGetEtagProperty( md5( '/resource' ) )
-        );
-        $propertyStorage->attach(
-            new ezcWebdavGetLastModifiedProperty( new DateTime( '@1124118780' 
) )
-        );
-        $propertyStorage->attach(
-            new ezcWebdavGetContentLengthProperty( '3' )
-        );
-
-        $request = new ezcWebdavGetRequest( '/resource' );
-        $request->validateHeaders();
-        $response = $backend->get( $request );
-
-        $this->assertEquals(
-            $response,
-            new ezcWebdavGetResourceResponse(
-                new ezcWebdavResource(
-                    '/resource', 
-                    $propertyStorage,
-                    'bar'
-                )
-            ),
-            'Expected response does not match real response.',
-            0,
-            20
-        );
-    }
-*/
+
     public function testCollectionGet()
     {
         $backend = new ezcWebdavFileBackend( $this->tempDir . 'backend/' );
@@ -1560,7 +1513,7 @@
             20
         );
     }
-/*
+
     public function testPropFindAllPropsOnCollection()
     {
         $backend = new ezcWebdavFileBackend( $this->tempDir . 'backend/' );
@@ -1810,7 +1763,7 @@
 
         // Then remove one of them using proppatch
         $removeProperties = new ezcWebdavFlaggedPropertyStorage();
-        $removeProperties->attach( $p_blubb, ezcWebdavPropPatchRequest::DELETE 
);
+        $removeProperties->attach( $p_blubb, ezcWebdavPropPatchRequest::REMOVE 
);
 
         $removedProperties = new ezcWebdavPropertyStorage();
         $removedProperties->attach( $p_blubb );
@@ -1895,15 +1848,15 @@
         // Then remove them again, with one live property in the middle to
         // check for proper failed dependency response codes.
         $removeProperties = new ezcWebdavFlaggedPropertyStorage();
-        $removeProperties->attach( $p_blubb, ezcWebdavPropPatchRequest::DELETE 
);
+        $removeProperties->attach( $p_blubb, ezcWebdavPropPatchRequest::REMOVE 
);
         $removeProperties->attach(  
             $p_length = new ezcWebdavGetContentLengthProperty(),
-            ezcWebdavPropPatchRequest::DELETE
-        );
-        $removeProperties->attach( $p_bar, ezcWebdavPropPatchRequest::DELETE );
+            ezcWebdavPropPatchRequest::REMOVE
+        );
+        $removeProperties->attach( $p_bar, ezcWebdavPropPatchRequest::REMOVE );
         $removeProperties->attach(  
             $p_last = new ezcWebdavGetLastModifiedProperty(),
-            ezcWebdavPropPatchRequest::DELETE
+            ezcWebdavPropPatchRequest::REMOVE
         );
 
         $request = new ezcWebdavPropPatchRequest( '/resource' );
@@ -2008,12 +1961,12 @@
         // Then remove them again, with one live property in the middle to
         // check for proper failed dependency response codes.
         $updateProperties = new ezcWebdavFlaggedPropertyStorage();
-        $updateProperties->attach( $p_blubb, ezcWebdavPropPatchRequest::DELETE 
);
+        $updateProperties->attach( $p_blubb, ezcWebdavPropPatchRequest::REMOVE 
);
         $updateProperties->attach( 
             $p_foo = new ezcWebdavDeadProperty( 'foo:', 'foo', 'random 
content' ),
             ezcWebdavPropPatchRequest::SET
         );
-        $updateProperties->attach( $p_bar, ezcWebdavPropPatchRequest::DELETE );
+        $updateProperties->attach( $p_bar, ezcWebdavPropPatchRequest::REMOVE );
 
         $request = new ezcWebdavPropPatchRequest( '/resource' );
         $request->updates = $updateProperties;
@@ -2102,16 +2055,16 @@
         // Then remove them again, with one live property in the middle to
         // check for proper failed dependency response codes.
         $updateProperties = new ezcWebdavFlaggedPropertyStorage();
-        $updateProperties->attach( $p_blubb, ezcWebdavPropPatchRequest::DELETE 
);
+        $updateProperties->attach( $p_blubb, ezcWebdavPropPatchRequest::REMOVE 
);
         $updateProperties->attach( 
             $p_length = new ezcWebdavGetContentLengthProperty(), 
-            ezcWebdavPropPatchRequest::DELETE
+            ezcWebdavPropPatchRequest::REMOVE
         );
         $updateProperties->attach( 
             $p_foo = new ezcWebdavDeadProperty( 'foo:', 'foo', 'random 
content' ),
             ezcWebdavPropPatchRequest::SET
         );
-        $updateProperties->attach( $p_bar, ezcWebdavPropPatchRequest::DELETE );
+        $updateProperties->attach( $p_bar, ezcWebdavPropPatchRequest::REMOVE );
 
         $request = new ezcWebdavPropPatchRequest( '/resource' );
         $request->updates = $updateProperties;
@@ -2145,7 +2098,6 @@
             20
         );
     }
-    // */
 }
 
 ?>


-- 
svn-components mailing list
[email protected]
http://lists.ez.no/mailman/listinfo/svn-components

Reply via email to