cvs: pecl(BRANCH_1_0_5) /sdo/DAS/Relational/Tests TestDataObjectHelper.php TestInsertAction.php TestObjectModel.php TestReferencesModel.php
TestRelational.php

From: Date: Wed, 22 Nov 2006 18:20:50 +0000
Subject: cvs: pecl(BRANCH_1_0_5) /sdo/DAS/Relational/Tests TestDataObjectHelper.php TestInsertAction.php TestObjectModel.php TestReferencesModel.php
TestRelational.php
Groups: php.pecl.cvs 
Request: Send a blank email to pecl-cvs+get-6677@lists.php.net to get a copy of this message
slaws Wed Nov 22 18:20:50 2006 UTC Modified files: (Branch: BRANCH_1_0_5) /pecl/sdo/DAS/Relational/Tests TestReferencesModel.php TestInsertAction.php TestObjectModel.php TestRelational.php TestDataObjectHelper.php Log: Fix to support the changes to allow more that one root object to exist in data object structures read by the relational DAS

http://cvs.php.net/viewvc.cgi/pecl/sdo/DAS/Relational/Tests/TestReferencesModel.php?r1=1.1&r2=1.1.4.1&diff_format=u Index: pecl/sdo/DAS/Relational/Tests/TestReferencesModel.php diff -u pecl/sdo/DAS/Relational/Tests/TestReferencesModel.php:1.1 pecl/sdo/DAS/Relational/Tests/TestReferencesModel.php:1.1.4.1 --- pecl/sdo/DAS/Relational/Tests/TestReferencesModel.php:1.1 Mon Jul 18 16:03:43 2005 +++ pecl/sdo/DAS/Relational/Tests/TestReferencesModel.php Wed Nov 22 18:20:50 2006 @@ -66,19 +66,19 @@ // try a model rooted on company - $references_model = new SDO_DAS_Relational_ContainmentReferencesModel('company',$SDO_references_metadata); + $references_model = new SDO_DAS_Relational_ContainmentReferencesModel('company',$SDO_references_metadata, $database_model); $this->assertTrue($references_model->getActiveTypes() == array('company', 'department', 'employee'), 'Expected three active types to be found' ); // try a model rooted on department - $references_model = new SDO_DAS_Relational_ContainmentReferencesModel('department',$SDO_references_metadata); + $references_model = new SDO_DAS_Relational_ContainmentReferencesModel('department',$SDO_references_metadata, $database_model); $this->assertTrue($references_model->getActiveTypes() == array('department', 'employee'), 'Expected two active types to be found' ); // try a model rooted on employee - $references_model = new SDO_DAS_Relational_ContainmentReferencesModel('employee',$SDO_references_metadata); + $references_model = new SDO_DAS_Relational_ContainmentReferencesModel('employee',$SDO_references_metadata, $database_model); $this->assertTrue($references_model->getActiveTypes() == array('employee'), 'Expected one active types to be found' ); @@ -114,7 +114,7 @@ $exception_thrown = false; try { $database_model = new SDO_DAS_Relational_DatabaseModel($database_metadata); - $references_model = new SDO_DAS_Relational_ContainmentReferencesModel('company',$SDO_references_metadata); + $references_model = new SDO_DAS_Relational_ContainmentReferencesModel('company',$SDO_references_metadata, $database_model); } catch (SDO_DAS_Relational_Exception $e) { $exception_thrown = true; $msg = $e->getMessage(); @@ -127,4 +127,4 @@ } -?> \ No newline at end of file +?> http://cvs.php.net/viewvc.cgi/pecl/sdo/DAS/Relational/Tests/TestInsertAction.php?r1=1.3&r2=1.3.4.1&diff_format=u Index: pecl/sdo/DAS/Relational/Tests/TestInsertAction.php diff -u pecl/sdo/DAS/Relational/Tests/TestInsertAction.php:1.3 pecl/sdo/DAS/Relational/Tests/TestInsertAction.php:1.3.4.1 --- pecl/sdo/DAS/Relational/Tests/TestInsertAction.php:1.3 Tue Aug 8 16:13:24 2006 +++ pecl/sdo/DAS/Relational/Tests/TestInsertAction.php Wed Nov 22 18:20:50 2006 @@ -82,7 +82,7 @@ $SDO_reference_metadata = array($department_reference, $employee_reference); $app_root_type = 'company'; $database_model = new SDO_DAS_Relational_DatabaseModel($database_metadata); - $containment_references_model = new SDO_DAS_Relational_ContainmentReferencesModel($app_root_type,$SDO_reference_metadata); + $containment_references_model = new SDO_DAS_Relational_ContainmentReferencesModel($app_root_type,$SDO_reference_metadata, $database_model); $this->object_model = new SDO_DAS_Relational_ObjectModel($database_model, $containment_references_model); $this->das = new SDO_DAS_Relational ($database_metadata,'company',$SDO_reference_metadata); } @@ -170,4 +170,4 @@ } } -?> \ No newline at end of file +?> http://cvs.php.net/viewvc.cgi/pecl/sdo/DAS/Relational/Tests/TestObjectModel.php?r1=1.1&r2=1.1.4.1&diff_format=u Index: pecl/sdo/DAS/Relational/Tests/TestObjectModel.php diff -u pecl/sdo/DAS/Relational/Tests/TestObjectModel.php:1.1 pecl/sdo/DAS/Relational/Tests/TestObjectModel.php:1.1.4.1 --- pecl/sdo/DAS/Relational/Tests/TestObjectModel.php:1.1 Mon Jul 18 16:03:43 2005 +++ pecl/sdo/DAS/Relational/Tests/TestObjectModel.php Wed Nov 22 18:20:50 2006 @@ -55,7 +55,7 @@ $exception_thrown = false; try { $database_model = new SDO_DAS_Relational_DatabaseModel($database_metadata); - $references_model = new SDO_DAS_Relational_ContainmentReferencesModel('not-a-valid-reference-or-table',$SDO_references_metadata); + $references_model = new SDO_DAS_Relational_ContainmentReferencesModel('not-a-valid-reference-or-table',$SDO_references_metadata, $database_model); $object_model = new SDO_DAS_Relational_ObjectModel($database_model, $references_model); } catch (SDO_DAS_Relational_Exception $e) { $exception_thrown = true; @@ -85,7 +85,7 @@ $exception_thrown = false; try { $database_model = new SDO_DAS_Relational_DatabaseModel($database_metadata); - $references_model = new SDO_DAS_Relational_ContainmentReferencesModel('company',$SDO_references_metadata); + $references_model = new SDO_DAS_Relational_ContainmentReferencesModel('company',$SDO_references_metadata, $database_model); $object_model = new SDO_DAS_Relational_ObjectModel($database_model, $references_model); } catch (SDO_DAS_Relational_Exception $e) { $exception_thrown = true; @@ -113,7 +113,7 @@ $exception_thrown = false; try { $database_model = new SDO_DAS_Relational_DatabaseModel($database_metadata); - $references_model = new SDO_DAS_Relational_ContainmentReferencesModel('company',$SDO_references_metadata); + $references_model = new SDO_DAS_Relational_ContainmentReferencesModel('company',$SDO_references_metadata, $database_model); $object_model = new SDO_DAS_Relational_ObjectModel($database_model,$references_model); } catch (SDO_DAS_Relational_Exception $e) { $exception_thrown = true; @@ -126,4 +126,4 @@ } -?> \ No newline at end of file +?> http://cvs.php.net/viewvc.cgi/pecl/sdo/DAS/Relational/Tests/TestRelational.php?r1=1.3&r2=1.3.4.1&diff_format=u Index: pecl/sdo/DAS/Relational/Tests/TestRelational.php diff -u pecl/sdo/DAS/Relational/Tests/TestRelational.php:1.3 pecl/sdo/DAS/Relational/Tests/TestRelational.php:1.3.4.1 --- pecl/sdo/DAS/Relational/Tests/TestRelational.php:1.3 Fri Mar 17 16:43:46 2006 +++ pecl/sdo/DAS/Relational/Tests/TestRelational.php Wed Nov 22 18:20:50 2006 @@ -68,6 +68,7 @@ $this->assertTrue(! $exception_thrown,'Unexpected exception was thrown:' . $msg); } +/* commented out because we now allow more than one root object public function testConstructor_ThrowsExceptionIfApplicationRootTypeNullAndMoreThanOneTable() { $company_table_metadata = array( 'name' => 'company', @@ -91,6 +92,7 @@ $this->assertTrue($exception_thrown,'Exception was never thrown'); $this->assertTrue(strpos($msg,'exactly one table') != 0,'Wrong message issued: '.$msg); } +*/ public function testConstructor_CanOmitReferencesMetadataIfExactlyOneTable() { @@ -221,4 +223,4 @@ } -?> \ No newline at end of file +?> http://cvs.php.net/viewvc.cgi/pecl/sdo/DAS/Relational/Tests/TestDataObjectHelper.php?r1=1.1&r2=1.1.4.1&diff_format=u Index: pecl/sdo/DAS/Relational/Tests/TestDataObjectHelper.php diff -u pecl/sdo/DAS/Relational/Tests/TestDataObjectHelper.php:1.1 pecl/sdo/DAS/Relational/Tests/TestDataObjectHelper.php:1.1.4.1 --- pecl/sdo/DAS/Relational/Tests/TestDataObjectHelper.php:1.1 Wed Oct 19 11:35:43 2005 +++ pecl/sdo/DAS/Relational/Tests/TestDataObjectHelper.php Wed Nov 22 18:20:50 2006 @@ -82,7 +82,7 @@ $SDO_reference_metadata = array($department_reference, $employee_reference); $app_root_type = 'company'; $database_model = new SDO_DAS_Relational_DatabaseModel($database_metadata); - $containment_references_model = new SDO_DAS_Relational_ContainmentReferencesModel($app_root_type,$SDO_reference_metadata); + $containment_references_model = new SDO_DAS_Relational_ContainmentReferencesModel($app_root_type,$SDO_reference_metadata, $database_model); $this->object_model = new SDO_DAS_Relational_ObjectModel($database_model, $containment_references_model); $this->das = new SDO_DAS_Relational ($database_metadata,'company',$SDO_reference_metadata); } @@ -113,4 +113,4 @@ } -?> \ No newline at end of file +?>
« previous php.pecl.cvs (#6677) next »