Author: kn Date: Tue Oct 30 13:10:09 2007 New Revision: 6633 Log: - Reactivated deactivated test cases. - Call clearstatcache() in some tests to get a reproducible result
Modified: trunk/Webdav/tests/backend_file_test.php trunk/Webdav/tests/data/responses/file/testPropFindAllPropsOnCollection.ser trunk/Webdav/tests/data/responses/file/testPropFindAllPropsOnResource.ser trunk/Webdav/tests/data/responses/file/testPropFindNamesOnCollectionDepthInfinite.ser trunk/Webdav/tests/data/responses/file/testPropFindNamesOnCollectionDepthOne.ser trunk/Webdav/tests/data/responses/file/testPropFindOnCollection.ser trunk/Webdav/tests/data/responses/file/testPropFindOnResource.ser trunk/Webdav/tests/data/responses/file/testPropPatchFailOnRemoveProperty_1.ser trunk/Webdav/tests/data/responses/file/testPropPatchFailOnRemoveProperty_2.ser 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] Tue Oct 30 13:10:09 2007 @@ -24,6 +24,8 @@ { protected $tempDir; + protected $oldTimezone; + public static function suite() { return new PHPUnit_Framework_TestSuite( 'ezcWebdavFileBackendTest' ); @@ -98,10 +100,17 @@ // Change this once 64bit systems are common, or we reached year 2038 2147483647 ); + + // Store current timezone and switch to UTC for test + $this->oldTimezone = date_default_timezone_get(); + date_default_timezone_set( 'UTC' ); } public function tearDown() { + // Reset old timezone + date_default_timezone_set( $this->oldTimezone ); + if ( !$this->hasFailed() ) { $this->removeTempDir(); @@ -277,9 +286,6 @@ ); } -/* - * - * @FIXME public function testCollectionGet() { $backend = new ezcWebdavFileBackend( $this->tempDir . 'backend/' ); @@ -309,7 +315,6 @@ 20 ); } -*/ public function testResourceDeepGet() { @@ -969,6 +974,11 @@ chmod ( $this->tempDir . 'backend/collection', 0 ); + // @TODO: This can be removed with the latest PHPUnit release, but for + // now we need it, or the is_file() call on backend/collection/test.txt + // will return a wrong cached result. + clearstatcache(); + $request = new ezcWebdavDeleteRequest( '/collection/test.txt' ); $request->validateHeaders(); $response = $backend->delete( $request ); @@ -976,7 +986,7 @@ $this->assertEquals( $response, new ezcWebdavErrorResponse( - ezcWebdavResponse::STATUS_403, + ezcWebdavResponse::STATUS_404, '/collection/test.txt' ), 'Expected response does not match real response.', @@ -1292,9 +1302,6 @@ $this->compareResponse( __FUNCTION__, $response ); } -/* - * - * @FIXME public function testPropMimeTypeOnResource() { $backend = new ezcWebdavFileBackend( $this->tempDir . 'backend/' ); @@ -1343,7 +1350,6 @@ 20 ); } -*/ public function testPropMimeTypeOnResourceWithoutGuessingPriorSet() { @@ -1395,9 +1401,6 @@ ); } -/* - * - * @FIXME public function testPropFindOnCollection() { $backend = new ezcWebdavFileBackend( $this->tempDir . 'backend/' ); @@ -1421,7 +1424,6 @@ $this->compareResponse( __FUNCTION__, $response ); } -*/ public function testPropFindNamesOnResource() { @@ -1448,9 +1450,6 @@ $this->compareResponse( __FUNCTION__, $response ); } -/* - * - * @FIXME public function testPropFindNamesOnCollectionDepthOne() { $backend = new ezcWebdavFileBackend( $this->tempDir . 'backend/' ); @@ -1463,11 +1462,7 @@ $this->compareResponse( __FUNCTION__, $response ); } -*/ - -/* - * - * @FIXME + public function testPropFindNamesOnCollectionDepthInfinite() { $backend = new ezcWebdavFileBackend( $this->tempDir . 'backend/' ); @@ -1480,7 +1475,6 @@ $this->compareResponse( __FUNCTION__, $response ); } -*/ public function testPropFindAllPropsOnResource() { @@ -1494,9 +1488,6 @@ $this->compareResponse( __FUNCTION__, $response ); } -/* - * - * @FIXME public function testPropFindAllPropsOnCollection() { $backend = new ezcWebdavFileBackend( $this->tempDir . 'backend/' ); @@ -1508,7 +1499,6 @@ $this->compareResponse( __FUNCTION__, $response ); } -*/ public function testPropPatchAddProperty() { Modified: trunk/Webdav/tests/data/responses/file/testPropFindAllPropsOnCollection.ser ============================================================================== Binary files - no diff available. Modified: trunk/Webdav/tests/data/responses/file/testPropFindAllPropsOnResource.ser ============================================================================== Binary files - no diff available. Modified: trunk/Webdav/tests/data/responses/file/testPropFindNamesOnCollectionDepthInfinite.ser ============================================================================== Binary files - no diff available. Modified: trunk/Webdav/tests/data/responses/file/testPropFindNamesOnCollectionDepthOne.ser ============================================================================== Binary files - no diff available. Modified: trunk/Webdav/tests/data/responses/file/testPropFindOnCollection.ser ============================================================================== Binary files - no diff available. Modified: trunk/Webdav/tests/data/responses/file/testPropFindOnResource.ser ============================================================================== Binary files - no diff available. Modified: trunk/Webdav/tests/data/responses/file/testPropPatchFailOnRemoveProperty_1.ser ============================================================================== Binary files - no diff available. Modified: trunk/Webdav/tests/data/responses/file/testPropPatchFailOnRemoveProperty_2.ser ============================================================================== Binary files - no diff available. -- svn-components mailing list svn-components@lists.ez.no http://lists.ez.no/mailman/listinfo/svn-components