Author: Derick Rethans
Date: 2006-01-14 15:49:31 +0100 (Sat, 14 Jan 2006)
New Revision: 1850

Log:
- Changed ezcBaseFilePermission error to allow reading/writing error at the 
same time.

Modified:
   packages/Base/trunk/src/exceptions/file_permission.php
   packages/Base/trunk/tests/base_test.php

Modified: packages/Base/trunk/src/exceptions/file_permission.php
===================================================================
--- packages/Base/trunk/src/exceptions/file_permission.php      2006-01-14 
14:04:14 UTC (rev 1849)
+++ packages/Base/trunk/src/exceptions/file_permission.php      2006-01-14 
14:49:31 UTC (rev 1850)
@@ -42,6 +42,9 @@
             case ezcBaseFileException::CHANGE:
                 $operation = "The permissions for <{$path}> can not be 
changed";
                 break;
+            case (ezcBaseFileException::READ || ezcBaseFileException::WRITE):
+                $operation = "The file <{$path}> can not be opened for reading 
and writing";
+                break;
         }
         
         $messagePart = '';

Modified: packages/Base/trunk/tests/base_test.php
===================================================================
--- packages/Base/trunk/tests/base_test.php     2006-01-14 14:04:14 UTC (rev 
1849)
+++ packages/Base/trunk/tests/base_test.php     2006-01-14 14:49:31 UTC (rev 
1850)
@@ -168,6 +168,18 @@
         }
     }
 
+    public function testFilePermissionException5()
+    {
+        try
+        {
+            throw new ezcBaseFilePermissionException( 'testfile.php', 
ezcBaseFilePermissionException::READ | ezcBaseFilePermissionException::WRITE, 
"Extra extra" );
+        }
+        catch ( ezcBaseException $e )
+        {
+            $this->assertEquals( "The file <testfile.php> can not be opened 
for reading and writing. (Extra extra)", $e->getMessage() );
+        }
+    }
+
     public function testPropertyNotFoundException()
     {
         try

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

Reply via email to