logo       

4105 - in trunk/PersistentObject: . src tests [eZComponents: Trunk]: msg#00275

web.ezcomponents.cvs

Subject: 4105 - in trunk/PersistentObject: . src tests [eZComponents: Trunk]

Author: Tobias Schlitt
Date: 2006-11-28 13:31:27 +0100 (Tue, 28 Nov 2006)
New Revision: 4105

Log:
- Fixed issue #9591: persistentsession attempts to throw non existing
exception (typo).

Modified:
trunk/PersistentObject/ChangeLog
trunk/PersistentObject/src/persistent_session.php
trunk/PersistentObject/tests/one_to_many_relation_test.php

Modified: trunk/PersistentObject/ChangeLog
===================================================================
--- trunk/PersistentObject/ChangeLog 2006-11-28 12:26:39 UTC (rev 4104)
+++ trunk/PersistentObject/ChangeLog 2006-11-28 12:31:27 UTC (rev 4105)
@@ -6,6 +6,8 @@
- Fixed issue #9493: Convert < and > in exception messages to ' and ' for
Cache, ConsoleTools, ImageAnalysis, ImageConversion, PersistentObject,
PersistentObjectDatabaseSchemaTiein.
+- Fixed issue #9591: persistentsession attempts to throw non existing
+ exception (typo).


1.2beta2 - Monday 20 November 2006

Modified: trunk/PersistentObject/src/persistent_session.php
===================================================================
--- trunk/PersistentObject/src/persistent_session.php 2006-11-28 12:26:39 UTC
(rev 4104)
+++ trunk/PersistentObject/src/persistent_session.php 2006-11-28 12:31:27 UTC
(rev 4105)
@@ -472,7 +472,7 @@
$resArr = $this->find( $query, $relatedClass );
if ( sizeof( $resArr ) < 1 )
{
- throw new ezcPersistentRelatedObjectNotFound( $object,
$relatedClass );
+ throw new ezcPersistentRelatedObjectNotFoundException( $object,
$relatedClass );
}
return $resArr[0];
}

Modified: trunk/PersistentObject/tests/one_to_many_relation_test.php
===================================================================
--- trunk/PersistentObject/tests/one_to_many_relation_test.php 2006-11-28
12:26:39 UTC (rev 4104)
+++ trunk/PersistentObject/tests/one_to_many_relation_test.php 2006-11-28
12:31:27 UTC (rev 4105)
@@ -261,6 +261,20 @@
);
}

+ public function testGetRelatedObjectFromEmployer3Failure()
+ {
+ $employer = $this->session->load( "RelationTestEmployer", 3 );
+ try
+ {
+ $this->session->getRelatedObject( $employer, "RelationTestPerson"
);
+ }
+ catch ( ezcPersistentRelatedObjectNotFoundException $e )
+ {
+ return;
+ }
+ $this->fail( "Exception not thrown when getRelatedObject() does not
find a record." );
+ }
+
public function testAddRelatedPersonsToEmployer2Success()
{
$employer = $this->session->load( "RelationTestEmployer", 2 );



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise