Bladeren bron

ZF-6770
- Moved the Table, Row & Rowset files into the _files directory of Zend/Db/Table

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@15668 44c647ce-9c0f-0410-b52a-842ac1e357ba

ralph 16 jaren geleden
bovenliggende
commit
96834d4ead
31 gewijzigde bestanden met toevoegingen van 461 en 392 verwijderingen
  1. 2 2
      tests/Zend/Db/Table/OracleTest.php
  2. 2 2
      tests/Zend/Db/Table/Pdo/OciTest.php
  3. 5 5
      tests/Zend/Db/Table/Pdo/PgsqlTest.php
  4. 4 0
      tests/Zend/Db/Table/Relationships/Pdo/MysqlTest.php
  5. 4 4
      tests/Zend/Db/Table/Relationships/StaticTest.php
  6. 125 104
      tests/Zend/Db/Table/Relationships/TestCommon.php
  7. 1 1
      tests/Zend/Db/Table/Row/OracleTest.php
  8. 1 1
      tests/Zend/Db/Table/Row/Pdo/OciTest.php
  9. 6 4
      tests/Zend/Db/Table/Row/StaticTest.php
  10. 31 20
      tests/Zend/Db/Table/Row/TestCommon.php
  11. 1 1
      tests/Zend/Db/Table/Rowset/TestCommon.php
  12. 5 5
      tests/Zend/Db/Table/Select/TestCommon.php
  13. 0 59
      tests/Zend/Db/Table/TableAccountsCustom.php
  14. 0 59
      tests/Zend/Db/Table/TableProductsCustom.php
  15. 69 66
      tests/Zend/Db/Table/TestCommon.php
  16. 30 5
      tests/Zend/Db/Table/TestSetup.php
  17. 2 2
      tests/Zend/Db/Table/_files/My/ZendDbTable/Row/TestMockRow.php
  18. 2 2
      tests/Zend/Db/Table/_files/My/ZendDbTable/Row/TestMyRow.php
  19. 3 3
      tests/Zend/Db/Table/_files/My/ZendDbTable/Row/TestStandaloneRow.php
  20. 3 3
      tests/Zend/Db/Table/_files/My/ZendDbTable/Row/TestTableRow.php
  21. 2 2
      tests/Zend/Db/Table/_files/My/ZendDbTable/Rowset/TestMyRowset.php
  22. 8 2
      tests/Zend/Db/Table/_files/My/ZendDbTable/TableAccounts.php
  23. 55 0
      tests/Zend/Db/Table/_files/My/ZendDbTable/TableAccountsCustom.php
  24. 11 5
      tests/Zend/Db/Table/_files/My/ZendDbTable/TableBugs.php
  25. 13 9
      tests/Zend/Db/Table/_files/My/ZendDbTable/TableBugsCustom.php
  26. 9 3
      tests/Zend/Db/Table/_files/My/ZendDbTable/TableBugsProducts.php
  27. 9 19
      tests/Zend/Db/Table/_files/My/ZendDbTable/TableBugsProductsCustom.php
  28. 8 2
      tests/Zend/Db/Table/_files/My/ZendDbTable/TableProducts.php
  29. 48 0
      tests/Zend/Db/Table/_files/My/ZendDbTable/TableProductsCustom.php
  30. 1 1
      tests/Zend/Db/Table/_files/My/ZendDbTable/TableSpecial.php
  31. 1 1
      tests/Zend/Db/TestUtil/Common.php

+ 2 - 2
tests/Zend/Db/Table/OracleTest.php

@@ -44,7 +44,7 @@ class Zend_Db_Table_OracleTest extends Zend_Db_Table_TestCommon
         $schemaName = $this->_util->getSchema();
         $tableName = 'zfbugs';
         $identifier = join('.', array_filter(array($schemaName, $tableName)));
-        $table = $this->_getTable('Zend_Db_Table_TableSpecial',
+        $table = $this->_getTable('My_ZendDbTable_TableSpecial',
             array('name' => $tableName, 'schema' => $schemaName, Zend_Db_Table_Abstract::SEQUENCE => 'zfbugs_seq')
         );
 
@@ -70,7 +70,7 @@ class Zend_Db_Table_OracleTest extends Zend_Db_Table_TestCommon
 
     public function testTableInsertSequence()
     {
-        $table = $this->_getTable('Zend_Db_Table_TableBugs',
+        $table = $this->_getTable('My_ZendDbTable_TableBugs',
             array(Zend_Db_Table_Abstract::SEQUENCE => 'zfbugs_seq'));
         $row = array (
             'bug_description' => 'New bug',

+ 2 - 2
tests/Zend/Db/Table/Pdo/OciTest.php

@@ -44,7 +44,7 @@ class Zend_Db_Table_Pdo_OciTest extends Zend_Db_Table_TestCommon
         $schemaName = $this->_util->getSchema();
         $tableName = 'zfbugs';
         $identifier = join('.', array_filter(array($schemaName, $tableName)));
-        $table = $this->_getTable('Zend_Db_Table_TableSpecial',
+        $table = $this->_getTable('My_ZendDbTable_TableSpecial',
             array('name' => $tableName, 'schema' => $schemaName,Zend_Db_Table_Abstract::SEQUENCE => 'zfbugs_seq')
         );
 
@@ -70,7 +70,7 @@ class Zend_Db_Table_Pdo_OciTest extends Zend_Db_Table_TestCommon
 
     public function testTableInsertSequence()
     {
-        $table = $this->_getTable('Zend_Db_Table_TableBugs',
+        $table = $this->_getTable('My_ZendDbTable_TableBugs',
             array(Zend_Db_Table_Abstract::SEQUENCE => 'zfbugs_seq'));
         $row = array (
             'bug_description' => 'New bug',

+ 5 - 5
tests/Zend/Db/Table/Pdo/PgsqlTest.php

@@ -86,7 +86,7 @@ class Zend_Db_Table_Pdo_PgsqlTest extends Zend_Db_Table_TestCommon
 
     public function testTableInsertSequence()
     {
-        $table = $this->_getTable('Zend_Db_Table_TableProducts',
+        $table = $this->_getTable('My_ZendDbTable_TableProducts',
             array(Zend_Db_Table_Abstract::SEQUENCE => 'zfproducts_seq'));
         $row = array (
             'product_name' => 'Solaris'
@@ -125,7 +125,7 @@ class Zend_Db_Table_Pdo_PgsqlTest extends Zend_Db_Table_TestCommon
             'schema'    => $schema
             );
 
-        $table = new Zend_Db_Table_TableBugs($config);
+        $table = new My_ZendDbTable_TableBugs($config);
 
         $tableInfo = $table->info();
 
@@ -148,7 +148,7 @@ class Zend_Db_Table_Pdo_PgsqlTest extends Zend_Db_Table_TestCommon
             'name'      => $tableName
             );
 
-        $table = new Zend_Db_Table_TableBugs($config);
+        $table = new My_ZendDbTable_TableBugs($config);
 
         $tableInfo = $table->info();
 
@@ -173,7 +173,7 @@ class Zend_Db_Table_Pdo_PgsqlTest extends Zend_Db_Table_TestCommon
             'name'      => $tableName
             );
 
-        $table = new Zend_Db_Table_TableBugs($config);
+        $table = new My_ZendDbTable_TableBugs($config);
 
         $tableInfo = $table->info();
 
@@ -194,7 +194,7 @@ class Zend_Db_Table_Pdo_PgsqlTest extends Zend_Db_Table_TestCommon
             'schema'    => $schema,
             );
 
-        $table = new Zend_Db_Table_TableBugs($config);
+        $table = new My_ZendDbTable_TableBugs($config);
 
         $rowset = $table->fetchAll();
 

+ 4 - 0
tests/Zend/Db/Table/Relationships/Pdo/MysqlTest.php

@@ -21,6 +21,10 @@
  * @version    $Id$
  */
 
+/**
+ * Test helper
+ */
+require_once dirname(__FILE__) . '/../../../../../TestHelper.php';
 
 /**
  * @see Zend_Db_Table_Relationships_TestCommon

+ 4 - 4
tests/Zend/Db/Table/Relationships/StaticTest.php

@@ -37,7 +37,7 @@ PHPUnit_Util_Filter::addFileToFilter(__FILE__);
 /**
  * @see Zend_Db_Table_Row_TestMockRow
  */
-require_once 'Zend/Db/Table/Row/TestMockRow.php';
+require_once dirname(__FILE__) . '/../_files/My/ZendDbTable/Row/TestMockRow.php';
 
 /**
  * @category   Zend
@@ -51,7 +51,7 @@ class Zend_Db_Table_Relationships_StaticTest extends PHPUnit_Framework_TestCase
 
     public function testTableRelationshipsFindDependentMagic()
     {
-        $row = new Zend_Db_Table_Row_TestMockRow();
+        $row = new My_ZendDbTable_Row_TestMockRow();
 
         $this->assertNull($row->dependentTable);
         $this->assertNull($row->ruleKey);
@@ -67,7 +67,7 @@ class Zend_Db_Table_Relationships_StaticTest extends PHPUnit_Framework_TestCase
 
     public function testTableRelationshipsFindParentMagic()
     {
-        $row = new Zend_Db_Table_Row_TestMockRow();
+        $row = new My_ZendDbTable_Row_TestMockRow();
 
         $this->assertNull($row->parentTable);
         $this->assertNull($row->ruleKey);
@@ -83,7 +83,7 @@ class Zend_Db_Table_Relationships_StaticTest extends PHPUnit_Framework_TestCase
 
     public function testTableRelationshipsFindManyToManyMagic()
     {
-        $row = new Zend_Db_Table_Row_TestMockRow();
+        $row = new My_ZendDbTable_Row_TestMockRow();
 
         $this->assertNull($row->matchTable);
         $this->assertNull($row->intersectionTable);

+ 125 - 104
tests/Zend/Db/Table/Relationships/TestCommon.php

@@ -61,7 +61,7 @@ abstract class Zend_Db_Table_Relationships_TestCommon extends Zend_Db_Table_Test
         $this->assertType('Zend_Db_Table_Row_Abstract', $childRow1,
             'Expecting object of type Zend_Db_Table_Row_Abstract, got '.get_class($childRow1));
 
-        $parentRow = $childRow1->findParentRow('Zend_Db_Table_TableAccounts');
+        $parentRow = $childRow1->findParentRow('My_ZendDbTable_TableAccounts');
         $this->assertType('Zend_Db_Table_Row_Abstract', $parentRow,
             'Expecting object of type Zend_Db_Table_Row_Abstract, got '.get_class($parentRow));
 
@@ -85,7 +85,7 @@ abstract class Zend_Db_Table_Relationships_TestCommon extends Zend_Db_Table_Test
         $this->assertType('Zend_Db_Table_Row_Abstract', $childRow1,
             'Expecting object of type Zend_Db_Table_Row_Abstract, got '.get_class($childRow1));
 
-        $parentRow = $childRow1->findParentRow('Zend_Db_Table_TableAccounts', null, $select);
+        $parentRow = $childRow1->findParentRow('My_ZendDbTable_TableAccounts', null, $select);
         $this->assertType('Zend_Db_Table_Row_Abstract', $parentRow,
             'Expecting object of type Zend_Db_Table_Row_Abstract, got '.get_class($parentRow));
 
@@ -107,7 +107,7 @@ abstract class Zend_Db_Table_Relationships_TestCommon extends Zend_Db_Table_Test
         $this->assertType('Zend_Db_Table_Row_Abstract', $childRow1,
             'Expecting object of type Zend_Db_Table_Row_Abstract, got '.get_class($childRow1));
 
-        $parentRow = $childRow1->findParentZend_Db_Table_TableAccounts();
+        $parentRow = $childRow1->findParentMy_ZendDbTable_TableAccounts();
         $this->assertType('Zend_Db_Table_Row_Abstract', $parentRow,
             'Expecting object of type Zend_Db_Table_Row_Abstract, got '.get_class($parentRow));
 
@@ -131,7 +131,7 @@ abstract class Zend_Db_Table_Relationships_TestCommon extends Zend_Db_Table_Test
         $this->assertType('Zend_Db_Table_Row_Abstract', $childRow1,
             'Expecting object of type Zend_Db_Table_Row_Abstract, got '.get_class($childRow1));
 
-        $parentRow = $childRow1->findParentZend_Db_Table_TableAccounts($select);
+        $parentRow = $childRow1->findParentMy_ZendDbTable_TableAccounts($select);
         $this->assertType('Zend_Db_Table_Row_Abstract', $parentRow,
             'Expecting object of type Zend_Db_Table_Row_Abstract, got '.get_class($parentRow));
 
@@ -191,7 +191,7 @@ abstract class Zend_Db_Table_Relationships_TestCommon extends Zend_Db_Table_Test
         $originRows = $table->find(1);
         $originRow1 = $originRows->current();
 
-        $destRows = $originRow1->findManyToManyRowset('Zend_Db_Table_TableProducts', 'Zend_Db_Table_TableBugsProducts');
+        $destRows = $originRow1->findManyToManyRowset('My_ZendDbTable_TableProducts', 'My_ZendDbTable_TableBugsProducts');
         $this->assertType('Zend_Db_Table_Rowset_Abstract', $destRows,
             'Expecting object of type Zend_Db_Table_Rowset_Abstract, got '.get_class($destRows));
 
@@ -212,7 +212,7 @@ abstract class Zend_Db_Table_Relationships_TestCommon extends Zend_Db_Table_Test
         $originRows = $table->find(1);
         $originRow1 = $originRows->current();
 
-        $destRows = $originRow1->findManyToManyRowset('Zend_Db_Table_TableProducts', 'Zend_Db_Table_TableBugsProducts',
+        $destRows = $originRow1->findManyToManyRowset('My_ZendDbTable_TableProducts', 'My_ZendDbTable_TableBugsProducts',
                                                       null, null, $select);
         $this->assertType('Zend_Db_Table_Rowset_Abstract', $destRows,
             'Expecting object of type Zend_Db_Table_Rowset_Abstract, got '.get_class($destRows));
@@ -230,7 +230,7 @@ abstract class Zend_Db_Table_Relationships_TestCommon extends Zend_Db_Table_Test
         $originRows = $table->find(1);
         $originRow1 = $originRows->current();
 
-        $destRows = $originRow1->findZend_Db_Table_TableProductsViaZend_Db_Table_TableBugsProducts();
+        $destRows = $originRow1->findMy_ZendDbTable_TableProductsViaMy_ZendDbTable_TableBugsProducts();
         $this->assertType('Zend_Db_Table_Rowset_Abstract', $destRows,
             'Expecting object of type Zend_Db_Table_Rowset_Abstract, got '.get_class($destRows));
 
@@ -251,7 +251,7 @@ abstract class Zend_Db_Table_Relationships_TestCommon extends Zend_Db_Table_Test
         $originRows = $table->find(1);
         $originRow1 = $originRows->current();
 
-        $destRows = $originRow1->findZend_Db_Table_TableProductsViaZend_Db_Table_TableBugsProducts($select);
+        $destRows = $originRow1->findMy_ZendDbTable_TableProductsViaMy_ZendDbTable_TableBugsProducts($select);
         $this->assertType('Zend_Db_Table_Rowset_Abstract', $destRows,
             'Expecting object of type Zend_Db_Table_Rowset_Abstract, got '.get_class($destRows));
 
@@ -270,7 +270,7 @@ abstract class Zend_Db_Table_Relationships_TestCommon extends Zend_Db_Table_Test
 
         // Use nonexistant class for destination table
         try {
-            $destRows = $originRow1->findManyToManyRowset('nonexistant_class', 'Zend_Db_Table_TableBugsProducts');
+            $destRows = $originRow1->findManyToManyRowset('nonexistant_class', 'My_ZendDbTable_TableBugsProducts');
             $this->fail('Expected to catch Zend_Db_Table_Row_Exception for nonexistent table class');
         } catch (Zend_Exception $e) {
             $this->assertType('Zend_Db_Table_Exception', $e,
@@ -280,7 +280,7 @@ abstract class Zend_Db_Table_Relationships_TestCommon extends Zend_Db_Table_Test
 
         // Use stdClass instead of table class for destination table
         try {
-            $destRows = $originRow1->findManyToManyRowset(new stdClass(), 'Zend_Db_Table_TableBugsProducts');
+            $destRows = $originRow1->findManyToManyRowset(new stdClass(), 'My_ZendDbTable_TableBugsProducts');
             $this->fail('Expected to catch Zend_Db_Table_Row_Exception for nonexistent table class');
         } catch (Zend_Exception $e) {
             $this->assertType('Zend_Db_Table_Exception', $e,
@@ -290,7 +290,7 @@ abstract class Zend_Db_Table_Relationships_TestCommon extends Zend_Db_Table_Test
 
         // Use nonexistant class for intersection table
         try {
-            $destRows = $originRow1->findManyToManyRowset('Zend_Db_Table_TableProducts', 'nonexistant_class');
+            $destRows = $originRow1->findManyToManyRowset('My_ZendDbTable_TableProducts', 'nonexistant_class');
             $this->fail('Expected to catch Zend_Db_Table_Row_Exception for nonexistent table class');
         } catch (Zend_Exception $e) {
             $this->assertType('Zend_Db_Table_Exception', $e,
@@ -300,7 +300,7 @@ abstract class Zend_Db_Table_Relationships_TestCommon extends Zend_Db_Table_Test
 
         // Use stdClass instead of table class for intersection table
         try {
-            $destRows = $originRow1->findManyToManyRowset('Zend_Db_Table_TableProducts', new stdClass());
+            $destRows = $originRow1->findManyToManyRowset('My_ZendDbTable_TableProducts', new stdClass());
             $this->fail('Expected to catch Zend_Db_Table_Row_Exception for nonexistent table class');
         } catch (Zend_Exception $e) {
             $this->assertType('Zend_Db_Table_Exception', $e,
@@ -321,7 +321,7 @@ abstract class Zend_Db_Table_Relationships_TestCommon extends Zend_Db_Table_Test
             'Expecting object of type Zend_Db_Table_Rowset_Abstract, got '.get_class($parentRows));
         $parentRow1 = $parentRows->current();
 
-        $childRows = $parentRow1->findDependentRowset('Zend_Db_Table_TableBugsProducts');
+        $childRows = $parentRow1->findDependentRowset('My_ZendDbTable_TableBugsProducts');
         $this->assertType('Zend_Db_Table_Rowset_Abstract', $childRows,
             'Expecting object of type Zend_Db_Table_Rowset_Abstract, got '.get_class($childRows));
 
@@ -349,7 +349,7 @@ abstract class Zend_Db_Table_Relationships_TestCommon extends Zend_Db_Table_Test
             'Expecting object of type Zend_Db_Table_Rowset_Abstract, got '.get_class($parentRows));
         $parentRow1 = $parentRows->current();
 
-        $childRows = $parentRow1->findDependentRowset('Zend_Db_Table_TableBugsProducts', null, $select);
+        $childRows = $parentRow1->findDependentRowset('My_ZendDbTable_TableBugsProducts', null, $select);
         $this->assertType('Zend_Db_Table_Rowset_Abstract', $childRows,
             'Expecting object of type Zend_Db_Table_Rowset_Abstract, got '.get_class($childRows));
 
@@ -370,7 +370,7 @@ abstract class Zend_Db_Table_Relationships_TestCommon extends Zend_Db_Table_Test
         $parentRows = $table->find(1);
         $parentRow1 = $parentRows->current();
 
-        $childRows = $parentRow1->findZend_Db_Table_TableBugsProducts();
+        $childRows = $parentRow1->findMy_ZendDbTable_TableBugsProducts();
         $this->assertType('Zend_Db_Table_Rowset_Abstract', $childRows,
             'Expecting object of type Zend_Db_Table_Rowset_Abstract, got '.get_class($childRows));
 
@@ -395,7 +395,7 @@ abstract class Zend_Db_Table_Relationships_TestCommon extends Zend_Db_Table_Test
         $parentRows = $table->find(1);
         $parentRow1 = $parentRows->current();
 
-        $childRows = $parentRow1->findZend_Db_Table_TableBugsProducts($select);
+        $childRows = $parentRow1->findMy_ZendDbTable_TableBugsProducts($select);
         $this->assertType('Zend_Db_Table_Rowset_Abstract', $childRows,
             'Expecting object of type Zend_Db_Table_Rowset_Abstract, got '.get_class($childRows));
 
@@ -442,14 +442,14 @@ abstract class Zend_Db_Table_Relationships_TestCommon extends Zend_Db_Table_Test
      */
     public function testTableRelationshipCascadingUpdateUsageBasicString()
     {
-        $bug = $this->_getTable('Zend_Db_Table_TableBugsCustom')
+        $bug = $this->_getTable('My_ZendDbTable_TableBugsCustom')
                 ->find(1)
                 ->current();
         $bug_id = $this->_db->foldCase('bug_id');
 
         $this->assertEquals(
             3,
-            count($bugProducts = $bug->findDependentRowset('Zend_Db_Table_TableBugsProductsCustom')),
+            count($bugProducts = $bug->findDependentRowset('My_ZendDbTable_TableBugsProductsCustom')),
             'Expecting to find three dependent rows'
             );
 
@@ -459,7 +459,7 @@ abstract class Zend_Db_Table_Relationships_TestCommon extends Zend_Db_Table_Test
 
         $this->assertEquals(
             3,
-            count($bugProducts = $bug->findDependentRowset('Zend_Db_Table_TableBugsProductsCustom')),
+            count($bugProducts = $bug->findDependentRowset('My_ZendDbTable_TableBugsProductsCustom')),
             'Expecting to find three dependent rows'
             );
 
@@ -473,7 +473,7 @@ abstract class Zend_Db_Table_Relationships_TestCommon extends Zend_Db_Table_Test
 
         $this->assertEquals(
             3,
-            count($bugProducts = $bug->findDependentRowset('Zend_Db_Table_TableBugsProductsCustom')),
+            count($bugProducts = $bug->findDependentRowset('My_ZendDbTable_TableBugsProductsCustom')),
             'Expecting to find three dependent rows'
             );
 
@@ -489,7 +489,7 @@ abstract class Zend_Db_Table_Relationships_TestCommon extends Zend_Db_Table_Test
      */
     public function testTableRelationshipCascadingUpdateUsageBasicArray()
     {
-        $account1 = $this->_getTable('Zend_Db_Table_TableAccountsCustom')
+        $account1 = $this->_getTable('My_ZendDbTable_TableAccountsCustom')
                     ->find('mmouse')
                     ->current();
         $account_name = $this->_db->foldCase('account_name');
@@ -497,7 +497,7 @@ abstract class Zend_Db_Table_Relationships_TestCommon extends Zend_Db_Table_Test
 
         $this->assertEquals(
             1,
-            count($account1->findDependentRowset('Zend_Db_Table_TableBugsCustom')),
+            count($account1->findDependentRowset('My_ZendDbTable_TableBugsCustom')),
             'Expecting to find one dependent row'
             );
 
@@ -507,7 +507,7 @@ abstract class Zend_Db_Table_Relationships_TestCommon extends Zend_Db_Table_Test
 
         $this->assertEquals(
             1,
-            count($account1Bugs = $account1->findDependentRowset('Zend_Db_Table_TableBugsCustom')),
+            count($account1Bugs = $account1->findDependentRowset('My_ZendDbTable_TableBugsCustom')),
             'Expecting to find one dependent row'
             );
 
@@ -521,7 +521,7 @@ abstract class Zend_Db_Table_Relationships_TestCommon extends Zend_Db_Table_Test
 
         $this->assertEquals(
             1,
-            count($account1Bugs = $account1->findDependentRowset('Zend_Db_Table_TableBugsCustom')),
+            count($account1Bugs = $account1->findDependentRowset('My_ZendDbTable_TableBugsCustom')),
             'Expecting to find one dependent row'
             );
 
@@ -537,13 +537,13 @@ abstract class Zend_Db_Table_Relationships_TestCommon extends Zend_Db_Table_Test
      */
     public function testTableRelationshipCascadingUpdateUsageInvalidNoop()
     {
-        $product1 = $this->_getTable('Zend_Db_Table_TableProductsCustom')
+        $product1 = $this->_getTable('My_ZendDbTable_TableProductsCustom')
                     ->find(1)
                     ->current();
 
         $this->assertEquals(
             1,
-            count($product1->findDependentRowset('Zend_Db_Table_TableBugsProductsCustom')),
+            count($product1->findDependentRowset('My_ZendDbTable_TableBugsProductsCustom')),
             'Expecting to find one dependent row'
             );
 
@@ -554,7 +554,7 @@ abstract class Zend_Db_Table_Relationships_TestCommon extends Zend_Db_Table_Test
 
         $this->assertEquals(
             0,
-            count($product1BugsProducts = $product1->findDependentRowset('Zend_Db_Table_TableBugsProductsCustom')),
+            count($product1BugsProducts = $product1->findDependentRowset('My_ZendDbTable_TableBugsProductsCustom')),
             'Expecting to find one dependent row'
             );
 
@@ -564,7 +564,7 @@ abstract class Zend_Db_Table_Relationships_TestCommon extends Zend_Db_Table_Test
 
         $this->assertEquals(
             1,
-            count($product1BugsProducts = $product1->findDependentRowset('Zend_Db_Table_TableBugsProductsCustom')),
+            count($product1BugsProducts = $product1->findDependentRowset('My_ZendDbTable_TableBugsProductsCustom')),
             'Expecting to find one dependent row'
             );
 
@@ -580,13 +580,13 @@ abstract class Zend_Db_Table_Relationships_TestCommon extends Zend_Db_Table_Test
      */
     public function testTableRelationshipCascadingDeleteUsageBasicString()
     {
-        $bug1 = $this->_getTable('Zend_Db_Table_TableBugsCustom')
+        $bug1 = $this->_getTable('My_ZendDbTable_TableBugsCustom')
                 ->find(1)
                 ->current();
 
         $this->assertEquals(
             3,
-            count($bug1->findDependentRowset('Zend_Db_Table_TableBugsProductsCustom')),
+            count($bug1->findDependentRowset('My_ZendDbTable_TableBugsProductsCustom')),
             'Expecting to find three dependent rows'
             );
 
@@ -596,7 +596,7 @@ abstract class Zend_Db_Table_Relationships_TestCommon extends Zend_Db_Table_Test
 
         $this->assertEquals(
             0,
-            count($this->_getTable('Zend_Db_Table_TableBugsProductsCustom')->fetchAll("$bug_id = 1")),
+            count($this->_getTable('My_ZendDbTable_TableBugsProductsCustom')->fetchAll("$bug_id = 1")),
             'Expecting cascading delete to have reduced dependent rows to zero'
             );
     }
@@ -610,19 +610,19 @@ abstract class Zend_Db_Table_Relationships_TestCommon extends Zend_Db_Table_Test
     {
         $reported_by = $this->_db->quoteIdentifier('reported_by', true);
 
-        $account1 = $this->_getTable('Zend_Db_Table_TableAccountsCustom')
+        $account1 = $this->_getTable('My_ZendDbTable_TableAccountsCustom')
                     ->find('mmouse')
                     ->current();
 
         $this->assertEquals(
             1,
-            count($account1->findDependentRowset('Zend_Db_Table_TableBugsCustom')),
+            count($account1->findDependentRowset('My_ZendDbTable_TableBugsCustom')),
             'Expecting to find one dependent row'
             );
 
         $account1->delete();
 
-        $tableBugsCustom = $this->_getTable('Zend_Db_Table_TableBugsCustom');
+        $tableBugsCustom = $this->_getTable('My_ZendDbTable_TableBugsCustom');
 
         $this->assertEquals(
             0,
@@ -643,13 +643,13 @@ abstract class Zend_Db_Table_Relationships_TestCommon extends Zend_Db_Table_Test
      */
     public function testTableRelationshipCascadingDeleteUsageInvalidNoop()
     {
-        $product1 = $this->_getTable('Zend_Db_Table_TableProductsCustom')
+        $product1 = $this->_getTable('My_ZendDbTable_TableProductsCustom')
                     ->find(1)
                     ->current();
 
         $this->assertEquals(
             1,
-            count($product1->findDependentRowset('Zend_Db_Table_TableBugsProductsCustom')),
+            count($product1->findDependentRowset('My_ZendDbTable_TableBugsProductsCustom')),
             'Expecting to find one dependent row'
             );
 
@@ -659,7 +659,7 @@ abstract class Zend_Db_Table_Relationships_TestCommon extends Zend_Db_Table_Test
 
         $this->assertEquals(
             1,
-            count($this->_getTable('Zend_Db_Table_TableBugsProductsCustom')->fetchAll("$product_id = 1")),
+            count($this->_getTable('My_ZendDbTable_TableBugsProductsCustom')->fetchAll("$product_id = 1")),
             'Expecting to find one dependent row'
             );
     }
@@ -668,7 +668,7 @@ abstract class Zend_Db_Table_Relationships_TestCommon extends Zend_Db_Table_Test
     {
         $table = $this->_table['bugs'];
 
-        $map = $table->getReference('Zend_Db_Table_TableAccounts', 'Reporter');
+        $map = $table->getReference('My_ZendDbTable_TableAccounts', 'Reporter');
 
         $this->assertThat($map, $this->arrayHasKey('columns'));
         $this->assertThat($map, $this->arrayHasKey('refTableClass'));
@@ -680,7 +680,7 @@ abstract class Zend_Db_Table_Relationships_TestCommon extends Zend_Db_Table_Test
         $table = $this->_table['bugs'];
 
         try {
-            $table->getReference('Zend_Db_Table_TableAccounts', 'Nonexistent');
+            $table->getReference('My_ZendDbTable_TableAccounts', 'Nonexistent');
             $this->fail('Expected to catch Zend_Db_Table_Exception for nonexistent reference rule');
         } catch (Zend_Exception $e) {
             $this->assertType('Zend_Db_Table_Exception', $e,
@@ -712,7 +712,9 @@ abstract class Zend_Db_Table_Relationships_TestCommon extends Zend_Db_Table_Test
      */
     public function testTableRelationshipFindParentRowCustomInstance()
     {
-        $myRowClass = 'Zend_Db_Table_Row_TestMyRow';
+        $this->_useMyIncludePath();
+        
+        $myRowClass = 'My_ZendDbTable_Row_TestMyRow';
 
         Zend_Loader::loadClass($myRowClass);
 
@@ -733,16 +735,18 @@ abstract class Zend_Db_Table_Relationships_TestCommon extends Zend_Db_Table_Test
      */
     public function testTableRelationshipFindParentRowCustomClass()
     {
-        $myRowClass = 'Zend_Db_Table_Row_TestMyRow';
+        $this->_useMyIncludePath();
+        
+        $myRowClass = 'My_ZendDbTable_Row_TestMyRow';
 
         Zend_Loader::loadClass($myRowClass);
 
-        Zend_Loader::loadClass('Zend_Db_Table_TableAccountsCustom');
+        Zend_Loader::loadClass('My_ZendDbTable_TableAccountsCustom');
 
-        $bug1Reporter = $this->_getTable('Zend_Db_Table_TableBugsCustom')
+        $bug1Reporter = $this->_getTable('My_ZendDbTable_TableBugsCustom')
                         ->find(1)
                         ->current()
-                        ->findParentRow(new Zend_Db_Table_TableAccountsCustom(array('db' => $this->_db)));
+                        ->findParentRow(new My_ZendDbTable_TableAccountsCustom(array('db' => $this->_db)));
 
         $this->assertType($myRowClass, $bug1Reporter,
             "Expecting object of type $myRowClass, got ".get_class($bug1Reporter));
@@ -756,8 +760,10 @@ abstract class Zend_Db_Table_Relationships_TestCommon extends Zend_Db_Table_Test
      */
     public function testTableRelationshipFindDependentRowsetCustomInstance()
     {
-        $myRowsetClass = 'Zend_Db_Table_Rowset_TestMyRowset';
-        $myRowClass    = 'Zend_Db_Table_Row_TestMyRow';
+        $this->_useMyIncludePath();
+        
+        $myRowsetClass = 'My_ZendDbTable_Rowset_TestMyRowset';
+        $myRowClass    = 'My_ZendDbTable_Row_TestMyRow';
 
         Zend_Loader::loadClass($myRowsetClass);
 
@@ -791,16 +797,18 @@ abstract class Zend_Db_Table_Relationships_TestCommon extends Zend_Db_Table_Test
      */
     public function testTableRelationshipFindDependentRowsetCustomClass()
     {
-        $myRowsetClass = 'Zend_Db_Table_Rowset_TestMyRowset';
-        $myRowClass    = 'Zend_Db_Table_Row_TestMyRow';
+        $this->_useMyIncludePath();
+        
+        $myRowsetClass = 'My_ZendDbTable_Rowset_TestMyRowset';
+        $myRowClass    = 'My_ZendDbTable_Row_TestMyRow';
 
         Zend_Loader::loadClass($myRowsetClass);
 
         $account_name = $this->_db->quoteIdentifier('account_name', true);
 
-        $bugs = $this->_getTable('Zend_Db_Table_TableAccountsCustom')
+        $bugs = $this->_getTable('My_ZendDbTable_TableAccountsCustom')
                 ->fetchRow($this->_db->quoteInto("$account_name = ?", 'mmouse'))
-                ->findDependentRowset('Zend_Db_Table_TableBugsCustom', 'Engineer');
+                ->findDependentRowset('My_ZendDbTable_TableBugsCustom', 'Engineer');
 
         $this->assertType($myRowsetClass, $bugs,
             "Expecting object of type $myRowsetClass, got ".get_class($bugs));
@@ -821,8 +829,10 @@ abstract class Zend_Db_Table_Relationships_TestCommon extends Zend_Db_Table_Test
      */
     public function testTableRelationshipFindManyToManyRowsetCustomInstance()
     {
-        $myRowsetClass = 'Zend_Db_Table_Rowset_TestMyRowset';
-        $myRowClass    = 'Zend_Db_Table_Row_TestMyRow';
+        $this->_useMyIncludePath();
+        
+        $myRowsetClass = 'My_ZendDbTable_Rowset_TestMyRowset';
+        $myRowClass    = 'My_ZendDbTable_Row_TestMyRow';
 
         Zend_Loader::loadClass($myRowsetClass);
 
@@ -833,7 +843,7 @@ abstract class Zend_Db_Table_Relationships_TestCommon extends Zend_Db_Table_Test
                             $this->_table['products']
                                 ->setRowsetClass($myRowsetClass)
                                 ->setRowClass($myRowClass),
-                            'Zend_Db_Table_TableBugsProducts'
+                            'My_ZendDbTable_TableBugsProducts'
                             );
 
         $this->assertType($myRowsetClass, $bug1Products,
@@ -855,17 +865,19 @@ abstract class Zend_Db_Table_Relationships_TestCommon extends Zend_Db_Table_Test
      */
     public function testTableRelationshipFindManyToManyRowsetCustomClass()
     {
-        $myRowsetClass = 'Zend_Db_Table_Rowset_TestMyRowset';
-        $myRowClass    = 'Zend_Db_Table_Row_TestMyRow';
+        $this->_useMyIncludePath();
+        
+        $myRowsetClass = 'My_ZendDbTable_Rowset_TestMyRowset';
+        $myRowClass    = 'My_ZendDbTable_Row_TestMyRow';
 
         Zend_Loader::loadClass($myRowsetClass);
 
-        $bug1Products = $this->_getTable('Zend_Db_Table_TableBugsCustom')
+        $bug1Products = $this->_getTable('My_ZendDbTable_TableBugsCustom')
                         ->find(1)
                         ->current()
                         ->findManyToManyRowset(
-                            'Zend_Db_Table_TableProductsCustom',
-                            'Zend_Db_Table_TableBugsProductsCustom'
+                            'My_ZendDbTable_TableProductsCustom',
+                            'My_ZendDbTable_TableBugsProductsCustom'
                             );
 
         $this->assertType($myRowsetClass, $bug1Products,
@@ -899,7 +911,7 @@ abstract class Zend_Db_Table_Relationships_TestCommon extends Zend_Db_Table_Test
         $this->assertType('Zend_Db_Table_Row_Abstract', $childRow1,
             'Expecting object of type Zend_Db_Table_Row_Abstract, got '.get_class($childRow1));
 
-        $parentRow = $childRow1->findParentRow('Zend_Db_Table_TableAccounts');
+        $parentRow = $childRow1->findParentRow('My_ZendDbTable_TableAccounts');
         $this->assertType('Zend_Db_Table_Row_Abstract', $parentRow,
             'Expecting object of type Zend_Db_Table_Row_Abstract, got '.get_class($parentRow));
 
@@ -936,7 +948,7 @@ abstract class Zend_Db_Table_Relationships_TestCommon extends Zend_Db_Table_Test
             'Expecting object of type Zend_Db_Table_Rowset_Abstract, got '.get_class($parentRows));
         $parentRow1 = $parentRows->current();
 
-        $childRows = $parentRow1->findDependentRowset('Zend_Db_Table_TableBugs');
+        $childRows = $parentRow1->findDependentRowset('My_ZendDbTable_TableBugs');
         $this->assertType('Zend_Db_Table_Rowset_Abstract', $childRows,
             'Expecting object of type Zend_Db_Table_Rowset_Abstract, got '.get_class($childRows));
 
@@ -977,7 +989,7 @@ abstract class Zend_Db_Table_Relationships_TestCommon extends Zend_Db_Table_Test
         $originRows = $table->find(1);
         $originRow1 = $originRows->current();
 
-        $destRows = $originRow1->findManyToManyRowset('Zend_Db_Table_TableProducts', 'Zend_Db_Table_TableBugsProducts');
+        $destRows = $originRow1->findManyToManyRowset('My_ZendDbTable_TableProducts', 'My_ZendDbTable_TableBugsProducts');
         $this->assertType('Zend_Db_Table_Rowset_Abstract', $destRows,
             'Expecting object of type Zend_Db_Table_Rowset_Abstract, got '.get_class($destRows));
 
@@ -1006,10 +1018,10 @@ abstract class Zend_Db_Table_Relationships_TestCommon extends Zend_Db_Table_Test
         $refMap = array(
             'Reporter' => array(
                 'columns'       => array('reported_by'),
-                'refTableClass' => 'Zend_Db_Table_TableAccounts'
+                'refTableClass' => 'My_ZendDbTable_TableAccounts'
             )
         );
-        $table = $this->_getTable('Zend_Db_Table_TableSpecial',
+        $table = $this->_getTable('My_ZendDbTable_TableSpecial',
             array(
                 'name'          => 'zfbugs',
                 'referenceMap'  => $refMap
@@ -1017,45 +1029,11 @@ abstract class Zend_Db_Table_Relationships_TestCommon extends Zend_Db_Table_Test
         );
 
         $bug1 = $table->find(1)->current();
-        $reporter = $bug1->findParentRow('Zend_Db_Table_TableAccounts');
+        $reporter = $bug1->findParentRow('My_ZendDbTable_TableAccounts');
         $this->assertEquals(array('account_name' => 'goofy'), $reporter->toArray());
     }
 
     /**
-     * Create database table based on BUGS_PRODUCTS bug with alternative
-     * spellings of column names.  Then create a Table class for this
-     * physical table and return it.
-     */
-    protected function _getBugsProductsWithDissimilarColumns()
-    {
-        $altCols = array(
-            'boog_id'      => 'INTEGER NOT NULL',
-            'produck_id'   => 'INTEGER NOT NULL',
-            'PRIMARY KEY'  => 'boog_id,produck_id'
-        );
-        $this->_util->createTable('AltBugsProducts', $altCols);
-        $altBugsProducts = $this->_db->quoteIdentifier($this->_db->foldCase('zfalt_bugs_products'), true);
-        $bugsProducts = $this->_db->quoteIdentifier($this->_db->foldCase('zfbugs_products'), true);
-        $this->_db->query("INSERT INTO $altBugsProducts SELECT * FROM $bugsProducts");
-
-        $refMap    = array(
-            'Boog' => array(
-                'columns'           => array('boog_id'),
-                'refTableClass'     => 'Zend_Db_Table_TableBugs',
-                'refColumns'        => array('bug_id')
-            ),
-            'Produck' => array(
-                'columns'           => array('produck_id'),
-                'refTableClass'     => 'Zend_Db_Table_TableProducts',
-                'refColumns'        => array('product_id')
-            )
-        );
-        $options = array('name' => 'zfalt_bugs_products', 'referenceMap' => $refMap);
-        $table = $this->_getTable('Zend_Db_Table_TableSpecial', $options);
-        return $table;
-    }
-
-    /**
      * Test that findParentRow() works even if the column names are
      * not the same.
      */
@@ -1067,10 +1045,10 @@ abstract class Zend_Db_Table_Relationships_TestCommon extends Zend_Db_Table_Test
         $intersectionTable = $this->_getBugsProductsWithDissimilarColumns();
         $intRow = $intersectionTable->find(2, 3)->current();
 
-        $bugRow = $intRow->findParentRow('Zend_Db_Table_TableBugs');
+        $bugRow = $intRow->findParentRow('My_ZendDbTable_TableBugs');
         $this->assertEquals(2, $bugRow->$bug_id);
 
-        $productRow = $intRow->findParentRow('Zend_Db_Table_TableProducts');
+        $productRow = $intRow->findParentRow('My_ZendDbTable_TableProducts');
         $this->assertEquals(3, $productRow->$product_id);
     }
 
@@ -1081,7 +1059,7 @@ abstract class Zend_Db_Table_Relationships_TestCommon extends Zend_Db_Table_Test
     public function testTableRelationshipFindDependentRowsetWithDissimilarColumns()
     {
         $intersectionTable = $this->_getBugsProductsWithDissimilarColumns();
-        $bugsTable = $this->_getTable('Zend_Db_Table_TableBugs');
+        $bugsTable = $this->_getTable('My_ZendDbTable_TableBugs');
         $bugRow = $bugsTable->find(2)->current();
 
         $intRows = $bugRow->findDependentRowset($intersectionTable);
@@ -1097,10 +1075,10 @@ abstract class Zend_Db_Table_Relationships_TestCommon extends Zend_Db_Table_Test
         $product_id = $this->_db->foldCase('product_id');
 
         $intersectionTable = $this->_getBugsProductsWithDissimilarColumns();
-        $bugsTable = $this->_getTable('Zend_Db_Table_TableBugs');
+        $bugsTable = $this->_getTable('My_ZendDbTable_TableBugs');
         $bugRow = $bugsTable->find(2)->current();
 
-        $productRows = $bugRow->findManyToManyRowset('Zend_Db_Table_TableProducts', $intersectionTable);
+        $productRows = $bugRow->findManyToManyRowset('My_ZendDbTable_TableProducts', $intersectionTable);
         $this->assertEquals(3, $productRows->current()->$product_id);
     }
 
@@ -1115,11 +1093,54 @@ abstract class Zend_Db_Table_Relationships_TestCommon extends Zend_Db_Table_Test
         $originRows = $table->find(1);
         $originRow1 = $originRows->current();
 
-        $destRows = $originRow1->findManyToManyRowset('Zend_Db_Table_TableBugs', 'Zend_Db_Table_TableBugsProducts');
+        $destRows = $originRow1->findManyToManyRowset('My_ZendDbTable_TableBugs', 'My_ZendDbTable_TableBugsProducts');
         $this->assertType('Zend_Db_Table_Rowset_Abstract', $destRows,
             'Expecting object of type Zend_Db_Table_Rowset_Abstract, got '.get_class($destRows));
 
         $this->assertEquals(1, $destRows->count());
     }
+    
+    
+    
+    /**
+     * Utility Methods Below
+     * 
+     */
+    
+    
+    
+    /**
+     * Create database table based on BUGS_PRODUCTS bug with alternative
+     * spellings of column names.  Then create a Table class for this
+     * physical table and return it.
+     */
+    protected function _getBugsProductsWithDissimilarColumns()
+    {
+        $altCols = array(
+            'boog_id'      => 'INTEGER NOT NULL',
+            'produck_id'   => 'INTEGER NOT NULL',
+            'PRIMARY KEY'  => 'boog_id,produck_id'
+        );
+        $this->_util->createTable('AltBugsProducts', $altCols);
+        $altBugsProducts = $this->_db->quoteIdentifier($this->_db->foldCase('zfalt_bugs_products'), true);
+        $bugsProducts = $this->_db->quoteIdentifier($this->_db->foldCase('zfbugs_products'), true);
+        $this->_db->query("INSERT INTO $altBugsProducts SELECT * FROM $bugsProducts");
+
+        $refMap    = array(
+            'Boog' => array(
+                'columns'           => array('boog_id'),
+                'refTableClass'     => 'My_ZendDbTable_TableBugs',
+                'refColumns'        => array('bug_id')
+            ),
+            'Produck' => array(
+                'columns'           => array('produck_id'),
+                'refTableClass'     => 'My_ZendDbTable_TableProducts',
+                'refColumns'        => array('product_id')
+            )
+        );
+        $options = array('name' => 'zfalt_bugs_products', 'referenceMap' => $refMap);
+        $table = $this->_getTable('My_ZendDbTable_TableSpecial', $options);
+        return $table;
+    }
 
 }

+ 1 - 1
tests/Zend/Db/Table/Row/OracleTest.php

@@ -36,7 +36,7 @@ class Zend_Db_Table_Row_OracleTest extends Zend_Db_Table_Row_TestCommon
      */
     protected function _testTableRowSetReadOnlyGetTableBugs()
     {
-        return $this->_getTable('Zend_Db_Table_TableBugs',
+        return $this->_getTable('My_ZendDbTable_TableBugs',
                                 array(Zend_Db_Table_Abstract::SEQUENCE => 'zfbugs_seq'));
     }
 

+ 1 - 1
tests/Zend/Db/Table/Row/Pdo/OciTest.php

@@ -36,7 +36,7 @@ class Zend_Db_Table_Row_Pdo_OciTest extends Zend_Db_Table_Row_TestCommon
      */
     protected function _testTableRowSetReadOnlyGetTableBugs()
     {
-        return $this->_getTable('Zend_Db_Table_TableBugs',
+        return $this->_getTable('My_ZendDbTable_TableBugs',
                                 array(Zend_Db_Table_Abstract::SEQUENCE => 'zfbugs_seq'));
     }
 

+ 6 - 4
tests/Zend/Db/Table/Row/StaticTest.php

@@ -26,11 +26,13 @@ PHPUnit_Util_Filter::addFileToFilter(__FILE__);
 /**
  * @see Zend_Db_Table_Row_TestMockRow
  */
-require_once 'Zend/Db/Table/Row/TestMockRow.php';
+require_once dirname(__FILE__) . '/../_files/My/ZendDbTable/Row/TestMockRow.php';
 
 class Zend_Db_Table_Row_StaticTest extends PHPUnit_Framework_TestCase
 {
 
+    
+    
     public function testTableRowTransformColumnNotUsedInConstructor()
     {
         $data = array(
@@ -38,7 +40,7 @@ class Zend_Db_Table_Row_StaticTest extends PHPUnit_Framework_TestCase
             'column_foo'     => 'value2',
             'column_bar_baz' => 'value3'
         );
-        $row = new Zend_Db_Table_Row_TestMockRow(array('data' => $data));
+        $row = new My_ZendDbTable_Row_TestMockRow(array('data' => $data));
 
         $array = $row->toArray();
         $this->assertEquals($data, $array);
@@ -51,7 +53,7 @@ class Zend_Db_Table_Row_StaticTest extends PHPUnit_Framework_TestCase
             'column_foo'     => 'value2',
             'column_bar_baz' => 'value3'
         );
-        $row = new Zend_Db_Table_Row_TestMockRow(array('data' => $data));
+        $row = new My_ZendDbTable_Row_TestMockRow(array('data' => $data));
 
         $this->assertEquals('value1', $row->column);
         $this->assertEquals('value2', $row->columnFoo);
@@ -65,7 +67,7 @@ class Zend_Db_Table_Row_StaticTest extends PHPUnit_Framework_TestCase
             'column_foo'     => 'value2',
             'column_bar_baz' => 'value3'
         );
-        $row = new Zend_Db_Table_Row_TestMockRow(array('data' => $data));
+        $row = new My_ZendDbTable_Row_TestMockRow(array('data' => $data));
 
         $this->assertEquals('value1', $row->column);
         $this->assertEquals('value2', $row->columnFoo);

+ 31 - 20
tests/Zend/Db/Table/Row/TestCommon.php

@@ -73,8 +73,8 @@ abstract class Zend_Db_Table_Row_TestCommon extends Zend_Db_Table_TestSetup
             'data'   => $data,
         );
 
-        Zend_Loader::loadClass('Zend_Db_Table_Row_TestTableRow');
-        return new Zend_Db_Table_Row_TestTableRow($config);
+        Zend_Loader::loadClass('My_ZendDbTable_Row_TestTableRow');
+        return new My_ZendDbTable_Row_TestTableRow($config);
     }
 
     public function testTableFindRow()
@@ -127,14 +127,16 @@ abstract class Zend_Db_Table_Row_TestCommon extends Zend_Db_Table_TestSetup
     // ZF-1144
     public function testTableRowContructorWithTableNameSpecifiedInSubclass()
     {
+        $this->_useMyIncludePath();
+        
         /**
          * @see Zend_Db_Table_Row_TestStandaloneRow
          */
-        require_once 'Zend/Db/Table/Row/TestStandaloneRow.php';
+        require_once 'My/ZendDbTable/Row/TestStandaloneRow.php';
 
         Zend_Db_Table_Abstract::setDefaultAdapter($this->_db);
 
-        $row = new Zend_Db_Table_Row_TestStandaloneRow();
+        $row = new My_ZendDbTable_Row_TestStandaloneRow();
         $this->assertType('Zend_Db_Table_Abstract', $row->getTable());
 
         Zend_Db_Table_Abstract::setDefaultAdapter();
@@ -401,7 +403,7 @@ abstract class Zend_Db_Table_Row_TestCommon extends Zend_Db_Table_TestSetup
 
     public function testTableRowSaveInsertSequence()
     {
-        $table = $this->_getTable('Zend_Db_Table_TableProducts',
+        $table = $this->_getTable('My_ZendDbTable_TableProducts',
             array(Zend_Db_Table_Abstract::SEQUENCE => 'zfproducts_seq'));
         $product_id   = $this->_db->foldCase('product_id');
         $product_name = $this->_db->foldCase('product_name');
@@ -474,7 +476,7 @@ abstract class Zend_Db_Table_Row_TestCommon extends Zend_Db_Table_TestSetup
         } catch (Zend_Exception $e) {
             $this->assertType('Zend_Db_Table_Exception', $e,
                 'Expecting object of type Zend_Db_Table_Row_Exception got '.get_class($e));
-            $this->assertEquals('The specified Table \'Zend_Db_Table_TableBugs\' does not have the same primary key as the Row', $e->getMessage());
+            $this->assertEquals('The specified Table \'My_ZendDbTable_TableBugs\' does not have the same primary key as the Row', $e->getMessage());
         }
     }
 
@@ -506,7 +508,7 @@ abstract class Zend_Db_Table_Row_TestCommon extends Zend_Db_Table_TestSetup
         } catch (Zend_Exception $e) {
             $this->assertType('Zend_Db_Table_Exception', $e,
                 'Expecting object of type Zend_Db_Table_Row_Exception got '.get_class($e));
-            $this->assertEquals('The specified Table \'Zend_Db_Table_TableBugs\' does not have the same primary key as the Row', $e->getMessage());
+            $this->assertEquals('The specified Table \'My_ZendDbTable_TableBugs\' does not have the same primary key as the Row', $e->getMessage());
         }
     }
 
@@ -550,7 +552,7 @@ abstract class Zend_Db_Table_Row_TestCommon extends Zend_Db_Table_TestSetup
         } catch (Zend_Exception $e) {
             $this->assertType('Zend_Db_Table_Exception', $e,
                 'Expecting object of type Zend_Db_Table_Exception got '.get_class($e));
-            $this->assertEquals('The specified Table is of class Zend_Db_Table_TableProducts, expecting class to be instance of Zend_Db_Table_TableBugs', $e->getMessage());
+            $this->assertEquals('The specified Table is of class My_ZendDbTable_TableProducts, expecting class to be instance of My_ZendDbTable_TableBugs', $e->getMessage());
         }
     }
 
@@ -567,7 +569,7 @@ abstract class Zend_Db_Table_Row_TestCommon extends Zend_Db_Table_TestSetup
         } catch (Zend_Exception $e) {
             $this->assertType('Zend_Db_Table_Exception', $e,
                 'Expecting object of type Zend_Db_Table_Row_Exception got '.get_class($e));
-            $this->assertEquals('The specified Table is of class Zend_Db_Table_TableBugs, expecting class to be instance of foo', $e->getMessage());
+            $this->assertEquals('The specified Table is of class My_ZendDbTable_TableBugs, expecting class to be instance of foo', $e->getMessage());
         }
     }
 
@@ -631,7 +633,7 @@ abstract class Zend_Db_Table_Row_TestCommon extends Zend_Db_Table_TestSetup
         } catch (Zend_Exception $e) {
             $this->assertType('Zend_Db_Table_Row_Exception', $e,
                 'Expecting object of type Zend_Db_Table_Row_Exception, got '.get_class($e));
-            $this->assertEquals("The specified Table 'Zend_Db_Table_TableBugsProducts' does not have the same primary key as the Row", $e->getMessage());
+            $this->assertEquals("The specified Table 'My_ZendDbTable_TableBugsProducts' does not have the same primary key as the Row", $e->getMessage());
         }
     }
 
@@ -781,20 +783,11 @@ abstract class Zend_Db_Table_Row_TestCommon extends Zend_Db_Table_TestSetup
         } catch (Zend_Exception $e) {
             $this->assertType('Zend_Db_Table_Row_Exception', $e,
                 'Expecting object of type Zend_Db_Table_Row_Exception, got '.get_class($e));
-            $this->assertEquals('The specified Table is of class Zend_Db_Table_TableProducts, expecting class to be instance of Zend_Db_Table_TableBugs', $e->getMessage());
+            $this->assertEquals('The specified Table is of class My_ZendDbTable_TableProducts, expecting class to be instance of My_ZendDbTable_TableBugs', $e->getMessage());
         }
         $this->assertFalse($connected);
     }
 
-    /**
-     * Allow adapters with sequences to declare them
-     * @return Zend_Db_Table_Abstract
-     */
-    protected function _testTableRowSetReadOnlyGetTableBugs()
-    {
-        return $this->_table['bugs'];
-    }
-
     public function testTableRowSetReadOnly()
     {
         $table = $this->_testTableRowSetReadOnlyGetTableBugs();
@@ -854,5 +847,23 @@ abstract class Zend_Db_Table_Row_TestCommon extends Zend_Db_Table_TestSetup
             $this->assertEquals('Specified column is not a string', $e->getMessage());
         }
     }
+    
+    
+    
+    /**
+     * Utility methods below
+     */
 
+    
+    
+    
+    /**
+     * Allow adapters with sequences to declare them
+     * @return Zend_Db_Table_Abstract
+     */
+    protected function _testTableRowSetReadOnlyGetTableBugs()
+    {
+        return $this->_table['bugs'];
+    }
+    
 }

+ 1 - 1
tests/Zend/Db/Table/Rowset/TestCommon.php

@@ -257,7 +257,7 @@ abstract class Zend_Db_Table_Rowset_TestCommon extends Zend_Db_Table_TestSetup
         } catch (Zend_Exception $e) {
             $this->assertType('Zend_Db_Table_Row_Exception', $e,
                 'Expecting object of type Zend_Db_Table_Row_Exception, got '.get_class($e));
-            $this->assertEquals('The specified Table is of class Zend_Db_Table_TableProducts, expecting class to be instance of Zend_Db_Table_TableBugs', $e->getMessage());
+            $this->assertEquals('The specified Table is of class My_ZendDbTable_TableProducts, expecting class to be instance of My_ZendDbTable_TableBugs', $e->getMessage());
         }
         $this->assertFalse($connected);
     }

+ 5 - 5
tests/Zend/Db/Table/Select/TestCommon.php

@@ -50,10 +50,10 @@ abstract class Zend_Db_Table_Select_TestCommon extends Zend_Db_Select_TestCommon
     {
         parent::setUp();
 
-        $this->_table['accounts']      = $this->_getTable('Zend_Db_Table_TableAccounts');
-        $this->_table['bugs']          = $this->_getTable('Zend_Db_Table_TableBugs');
-        $this->_table['bugs_products'] = $this->_getTable('Zend_Db_Table_TableBugsProducts');
-        $this->_table['products']      = $this->_getTable('Zend_Db_Table_TableProducts');
+        $this->_table['accounts']      = $this->_getTable('My_ZendDbTable_TableAccounts');
+        $this->_table['bugs']          = $this->_getTable('My_ZendDbTable_TableBugs');
+        $this->_table['bugs_products'] = $this->_getTable('My_ZendDbTable_TableBugsProducts');
+        $this->_table['products']      = $this->_getTable('My_ZendDbTable_TableProducts');
     }
 
     protected function _getTable($tableClass, $options = array())
@@ -196,7 +196,7 @@ abstract class Zend_Db_Table_Select_TestCommon extends Zend_Db_Select_TestCommon
         $table = $this->_getSelectTable('products');
         $select = $table->select();
 
-        $this->assertType('Zend_Db_Table_TableProducts', $select->getTable());
+        $this->assertType('My_ZendDbTable_Products', $select->getTable());
     }
     
     /**

+ 0 - 59
tests/Zend/Db/Table/TableAccountsCustom.php

@@ -1,59 +0,0 @@
-<?php
-
-/**
- * Zend Framework
- *
- * LICENSE
- *
- * This source file is subject to the new BSD license that is bundled
- * with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * http://framework.zend.com/license/new-bsd
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@zend.com so we can send you a copy immediately.
- *
- * @category   Zend
- * @package    Zend_Db
- * @subpackage UnitTests
- * @copyright  Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
- * @license    http://framework.zend.com/license/new-bsd     New BSD License
- * @version    $Id$
- */
-
-
-/**
- * @see Zend_Db_Table_TableAccounts
- */
-require_once 'Zend/Db/Table/TableAccounts.php';
-
-
-/**
- * @see Zend_Db_Table_Row_TestMyRow
- */
-require_once 'Zend/Db/Table/Row/TestMyRow.php';
-
-
-/**
- * @see Zend_Db_Table_Row_TestMyRowset
- */
-require_once 'Zend/Db/Table/Rowset/TestMyRowset.php';
-
-
-PHPUnit_Util_Filter::addFileToFilter(__FILE__);
-
-
-/**
- * @category   Zend
- * @package    Zend_Db
- * @subpackage UnitTests
- * @copyright  Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
- * @license    http://framework.zend.com/license/new-bsd     New BSD License
- */
-class Zend_Db_Table_TableAccountsCustom extends Zend_Db_Table_TableAccounts
-{
-    protected $_rowClass    = 'Zend_Db_Table_Row_TestMyRow';
-    protected $_rowsetClass = 'Zend_Db_Table_Rowset_TestMyRowset';
-
-    protected $_dependentTables = array('Zend_Db_Table_TableBugsCustom');
-}

+ 0 - 59
tests/Zend/Db/Table/TableProductsCustom.php

@@ -1,59 +0,0 @@
-<?php
-
-/**
- * Zend Framework
- *
- * LICENSE
- *
- * This source file is subject to the new BSD license that is bundled
- * with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * http://framework.zend.com/license/new-bsd
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@zend.com so we can send you a copy immediately.
- *
- * @category   Zend
- * @package    Zend_Db
- * @subpackage UnitTests
- * @copyright  Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
- * @license    http://framework.zend.com/license/new-bsd     New BSD License
- * @version    $Id$
- */
-
-
-/**
- * @see Zend_Db_Table_TableProducts
- */
-require_once 'Zend/Db/Table/TableProducts.php';
-
-
-/**
- * @see Zend_Db_Table_Row_TestMyRow
- */
-require_once 'Zend/Db/Table/Row/TestMyRow.php';
-
-
-/**
- * @see Zend_Db_Table_Row_TestMyRowset
- */
-require_once 'Zend/Db/Table/Rowset/TestMyRowset.php';
-
-
-PHPUnit_Util_Filter::addFileToFilter(__FILE__);
-
-
-/**
- * @category   Zend
- * @package    Zend_Db
- * @subpackage UnitTests
- * @copyright  Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
- * @license    http://framework.zend.com/license/new-bsd     New BSD License
- */
-class Zend_Db_Table_TableProductsCustom extends Zend_Db_Table_TableProducts
-{
-    protected $_rowClass    = 'Zend_Db_Table_Row_TestMyRow';
-    protected $_rowsetClass = 'Zend_Db_Table_Rowset_TestMyRowset';
-
-    protected $_dependentTables = array('Zend_Db_Table_TableBugsProductsCustom');
-}

+ 69 - 66
tests/Zend/Db/Table/TestCommon.php

@@ -65,7 +65,7 @@ abstract class Zend_Db_Table_TestCommon extends Zend_Db_Table_TestSetup
                         'sequence'        => $info['sequence'],
                         'unknownKey'      => 'testValue');
 
-        $table = new Zend_Db_Table_TableBugs($config);
+        $table = new My_ZendDbTable_TableBugs($config);
     }
 
     // ZF-2379
@@ -73,15 +73,15 @@ abstract class Zend_Db_Table_TestCommon extends Zend_Db_Table_TestSetup
     {
         $expectedReferences = array(
             'columns'           => array('reported_by'),
-            'refTableClass'     => 'Zend_Db_Table_TableAccounts',
+            'refTableClass'     => 'My_ZendDbTable_TableAccounts',
             'refColumns'        => array('account_name')
         );
 
         $products = $this->_table['products'];
         $products->addReference('Reporter', 'reported_by',
-                                'Zend_Db_Table_TableAccounts', 'account_name');
+                                'My_ZendDbTable_TableAccounts', 'account_name');
 
-        $references = $products->getReference('Zend_Db_Table_TableAccounts');
+        $references = $products->getReference('My_ZendDbTable_TableAccounts');
 
         $this->assertEquals($expectedReferences, $references);
     }
@@ -208,7 +208,8 @@ abstract class Zend_Db_Table_TestCommon extends Zend_Db_Table_TestSetup
 
     public function testTableImplicitName()
     {
-        Zend_Loader::loadClass('Zend_Db_Table_TableSpecial');
+        include_once '_files/My/ZendDbTable/TableSpecial.php';
+        
         // TableSpecial.php contains class bugs_products too.
         $table = new zfbugs_products(array('db' => $this->_db));
         $info = $table->info();
@@ -219,7 +220,7 @@ abstract class Zend_Db_Table_TestCommon extends Zend_Db_Table_TestSetup
     public function testTableOptionName()
     {
         $tableName = 'zfbugs';
-        $table = $this->_getTable('Zend_Db_Table_TableSpecial',
+        $table = $this->_getTable('My_ZendDbTable_TableSpecial',
             array('name' => $tableName)
         );
         $info = $table->info();
@@ -231,7 +232,7 @@ abstract class Zend_Db_Table_TestCommon extends Zend_Db_Table_TestSetup
     {
         $schemaName = $this->_util->getSchema();
         $tableName = 'zfbugs';
-        $table = $this->_getTable('Zend_Db_Table_TableSpecial',
+        $table = $this->_getTable('My_ZendDbTable_TableSpecial',
             array('name' => $tableName, 'schema' => $schemaName)
         );
         $info = $table->info();
@@ -241,7 +242,7 @@ abstract class Zend_Db_Table_TestCommon extends Zend_Db_Table_TestSetup
 
     public function testTableArgumentAdapter()
     {
-        $table = $this->_getTable('Zend_Db_Table_TableBugs',
+        $table = $this->_getTable('My_ZendDbTable_TableBugs',
             $this->_db);
         $db = $table->getAdapter();
         $this->assertSame($this->_db, $db);
@@ -249,7 +250,7 @@ abstract class Zend_Db_Table_TestCommon extends Zend_Db_Table_TestSetup
 
     public function testTableOptionAdapter()
     {
-        $table = $this->_getTable('Zend_Db_Table_TableBugs',
+        $table = $this->_getTable('My_ZendDbTable_TableBugs',
             array('db' => $this->_db));
         $db = $table->getAdapter();
         $this->assertSame($this->_db, $db);
@@ -257,12 +258,12 @@ abstract class Zend_Db_Table_TestCommon extends Zend_Db_Table_TestSetup
 
     public function testTableOptionRowClass()
     {
-        $table = $this->_getTable('Zend_Db_Table_TableBugs',
+        $table = $this->_getTable('My_ZendDbTable_TableBugs',
             array('rowClass' => 'stdClass'));
         $rowClass = $table->getRowClass();
         $this->assertEquals($rowClass, 'stdClass');
 
-        $table = $this->_getTable('Zend_Db_Table_TableBugs',
+        $table = $this->_getTable('My_ZendDbTable_TableBugs',
             array('rowsetClass' => 'stdClass'));
         $rowsetClass = $table->getRowsetClass();
         $this->assertEquals($rowsetClass, 'stdClass');
@@ -284,75 +285,75 @@ abstract class Zend_Db_Table_TestCommon extends Zend_Db_Table_TestSetup
     {
         $refReporter = array(
             'columns'           => array('reported_by'),
-            'refTableClass'     => 'Zend_Db_Table_TableAccounts',
+            'refTableClass'     => 'My_ZendDbTable_TableAccounts',
             'refColumns'        => array('account_id')
         );
         $refEngineer = array(
             'columns'           => array('assigned_to'),
-            'refTableClass'     => 'Zend_Db_Table_TableAccounts',
+            'refTableClass'     => 'My_ZendDbTable_TableAccounts',
             'refColumns'        => array('account_id')
         );
         $refMap = array(
             'Reporter' => $refReporter,
             'Engineer' => $refEngineer
         );
-        $table = $this->_getTable('Zend_Db_Table_TableBugs',
+        $table = $this->_getTable('My_ZendDbTable_TableBugs',
             array('referenceMap' => $refMap));
 
-        $this->assertEquals($refReporter, $table->getReference('Zend_Db_Table_TableAccounts'));
-        $this->assertEquals($refReporter, $table->getReference('Zend_Db_Table_TableAccounts', 'Reporter'));
-        $this->assertEquals($refEngineer, $table->getReference('Zend_Db_Table_TableAccounts', 'Engineer'));
+        $this->assertEquals($refReporter, $table->getReference('My_ZendDbTable_TableAccounts'));
+        $this->assertEquals($refReporter, $table->getReference('My_ZendDbTable_TableAccounts', 'Reporter'));
+        $this->assertEquals($refEngineer, $table->getReference('My_ZendDbTable_TableAccounts', 'Engineer'));
     }
 
     public function testTableExceptionOptionReferenceMap()
     {
         $refReporter = array(
             'columns'           => array('reported_by'),
-            'refTableClass'     => 'Zend_Db_Table_TableAccounts',
+            'refTableClass'     => 'My_ZendDbTable_TableAccounts',
             'refColumns'        => array('account_id')
         );
         $refEngineer = array(
             'columns'           => array('assigned_to'),
-            'refTableClass'     => 'Zend_Db_Table_TableAccounts',
+            'refTableClass'     => 'My_ZendDbTable_TableAccounts',
             'refColumns'        => array('account_id')
         );
         $refMap = array(
             'Reporter' => $refReporter,
             'Engineer' => $refEngineer
         );
-        $table = $this->_getTable('Zend_Db_Table_TableBugs',
+        $table = $this->_getTable('My_ZendDbTable_TableBugs',
             array('referenceMap' => $refMap));
 
         try {
-            $ref = $table->getReference('Zend_Db_Table_TableAccounts', 'Verifier');
+            $ref = $table->getReference('My_ZendDbTable_TableAccounts', 'Verifier');
             $this->fail('Expected to catch Zend_Db_Table_Exception');
         } catch (Zend_Exception $e) {
             $this->assertType('Zend_Db_Table_Exception', $e);
-            $this->assertEquals('No reference rule "Verifier" from table Zend_Db_Table_TableBugs to table Zend_Db_Table_TableAccounts', $e->getMessage());
+            $this->assertEquals('No reference rule "Verifier" from table My_ZendDbTable_TableBugs to table My_ZendDbTable_TableAccounts', $e->getMessage());
         }
 
         try {
-            $ref = $table->getReference('Zend_Db_Table_TableProducts');
+            $ref = $table->getReference('My_ZendDbTable_TableProducts');
             $this->fail('Expected to catch Zend_Db_Table_Exception');
         } catch (Zend_Exception $e) {
             $this->assertType('Zend_Db_Table_Exception', $e);
-            $this->assertEquals('No reference from table Zend_Db_Table_TableBugs to table Zend_Db_Table_TableProducts', $e->getMessage());
+            $this->assertEquals('No reference from table My_ZendDbTable_TableBugs to table My_ZendDbTable_TableProducts', $e->getMessage());
         }
 
         try {
-            $ref = $table->getReference('Zend_Db_Table_TableProducts', 'Product');
+            $ref = $table->getReference('My_ZendDbTable_TableProducts', 'Product');
             $this->fail('Expected to catch Zend_Db_Table_Exception');
         } catch (Zend_Exception $e) {
             $this->assertType('Zend_Db_Table_Exception', $e);
-            $this->assertEquals('No reference rule "Product" from table Zend_Db_Table_TableBugs to table Zend_Db_Table_TableProducts', $e->getMessage());
+            $this->assertEquals('No reference rule "Product" from table My_ZendDbTable_TableBugs to table My_ZendDbTable_TableProducts', $e->getMessage());
         }
 
         try {
-            $ref = $table->getReference('Zend_Db_Table_TableProducts', 'Reporter');
+            $ref = $table->getReference('My_ZendDbTable_TableProducts', 'Reporter');
             $this->fail('Expected to catch Zend_Db_Table_Exception');
         } catch (Zend_Exception $e) {
             $this->assertType('Zend_Db_Table_Exception', $e);
-            $this->assertEquals('Reference rule "Reporter" does not reference table Zend_Db_Table_TableProducts', $e->getMessage());
+            $this->assertEquals('Reference rule "Reporter" does not reference table My_ZendDbTable_TableProducts', $e->getMessage());
         }
 
     }
@@ -360,7 +361,7 @@ abstract class Zend_Db_Table_TestCommon extends Zend_Db_Table_TestSetup
     public function testTableOptionDependentTables()
     {
         $depTables = array('Zend_Db_Table_Foo');
-        $table = $this->_getTable('Zend_Db_Table_TableBugs',
+        $table = $this->_getTable('My_ZendDbTable_TableBugs',
             array('dependentTables' => $depTables));
         $this->assertEquals($depTables, $table->getDependentTables());
     }
@@ -384,11 +385,11 @@ abstract class Zend_Db_Table_TestCommon extends Zend_Db_Table_TestSetup
         /**
          * Don't use _getTable() method because it defaults the adapter
          */
-        Zend_Loader::loadClass('Zend_Db_Table_TableBugs');
+        Zend_Loader::loadClass('My_ZendDbTable_TableBugs');
         Zend_Db_Table_Abstract::setDefaultAdapter($this->_db);
         $db = Zend_Db_Table_Abstract::getDefaultAdapter();
         $this->assertSame($this->_db, $db);
-        $table = new Zend_Db_Table_TableBugs();
+        $table = new My_ZendDbTable_TableBugs();
         $db = $table->getAdapter();
         $this->assertSame($this->_db, $db);
     }
@@ -398,7 +399,7 @@ abstract class Zend_Db_Table_TestCommon extends Zend_Db_Table_TestSetup
         Zend_Db_Table_Abstract::setDefaultAdapter(null);
         $this->assertNull(Zend_Db_Table_Abstract::getDefaultAdapter());
         try {
-            $table = new Zend_Db_Table_TableBugs();
+            $table = new My_ZendDbTable_TableBugs();
             $this->fail('Zend_Db_Table_Exception should be thrown');
         }catch(Zend_Exception $e) {
          $this->assertType('Zend_Db_Table_Exception', $e,
@@ -420,12 +421,12 @@ abstract class Zend_Db_Table_TestCommon extends Zend_Db_Table_TestSetup
         /**
          * Don't use _getTable() method because it defaults the adapter
          */
-        Zend_Loader::loadClass('Zend_Db_Table_TableBugs');
+        Zend_Loader::loadClass('My_ZendDbTable_TableBugs');
         Zend_Registry::set('registered_db', $this->_db);
         Zend_Db_Table_Abstract::setDefaultAdapter('registered_db');
         $db = Zend_Db_Table_Abstract::getDefaultAdapter();
         $this->assertSame($this->_db, $db);
-        $table = new Zend_Db_Table_TableBugs();
+        $table = new My_ZendDbTable_TableBugs();
         $db = $table->getAdapter();
         $this->assertSame($this->_db, $db);
     }
@@ -454,7 +455,7 @@ abstract class Zend_Db_Table_TestCommon extends Zend_Db_Table_TestSetup
     public function testTableExceptionPrimaryKeyNotSpecified()
     {
         try {
-            $table = $this->_getTable('Zend_Db_Table_TableBugs', array('primary' => ''));
+            $table = $this->_getTable('My_ZendDbTable_TableBugs', array('primary' => ''));
             $primary = $table->info(Zend_Db_Table_Abstract::PRIMARY);
             $this->fail('Expected to catch Zend_Db_Table_Exception');
         } catch (Zend_Exception $e) {
@@ -468,7 +469,7 @@ abstract class Zend_Db_Table_TestCommon extends Zend_Db_Table_TestSetup
     public function testTableExceptionInvalidPrimaryKey()
     {
         try {
-            $table   = new Zend_Db_Table_TableBugs(array('primary' => 'foo'));
+            $table   = new My_ZendDbTable_TableBugs(array('primary' => 'foo'));
             $primary = $table->info(Zend_Db_Table_Abstract::PRIMARY);
             $this->fail('Expected to catch Zend_Db_Table_Exception');
         } catch (Zend_Exception $e) {
@@ -486,7 +487,7 @@ abstract class Zend_Db_Table_TestCommon extends Zend_Db_Table_TestSetup
         $tableName = $this->_util->getTableName('noprimarykey');
 
         try {
-            $table = $this->_getTable('Zend_Db_Table_TableSpecial',
+            $table = $this->_getTable('My_ZendDbTable_TableSpecial',
                 array('name' => $tableName));
             $primary = $table->info(Zend_Db_Table_Abstract::PRIMARY);
             $this->fail('Expected to catch Zend_Db_Table_Exception');
@@ -506,7 +507,7 @@ abstract class Zend_Db_Table_TestCommon extends Zend_Db_Table_TestSetup
         $tableName = $this->_util->getTableName('noprimarykey');
 
         try {
-            $table = $this->_getTable('Zend_Db_Table_TableSpecial',
+            $table = $this->_getTable('My_ZendDbTable_TableSpecial',
                 array('name' => $tableName, 'primary' => 'id'));
         } catch (Zend_Exception $e) {
             $this->fail('Expected to succeed without a Zend_Db_Table_Exception');
@@ -520,13 +521,13 @@ abstract class Zend_Db_Table_TestCommon extends Zend_Db_Table_TestSetup
 
     public function testTableAdapterException()
     {
-        Zend_Loader::loadClass('Zend_Db_Table_TableBugs');
+        Zend_Loader::loadClass('My_ZendDbTable_TableBugs');
 
         /**
          * options array points 'db' to integer scalar
          */
         try {
-            $table = new Zend_Db_Table_TableBugs(array('db' => 327));
+            $table = new My_ZendDbTable_TableBugs(array('db' => 327));
             $this->fail('Expected to catch Zend_Db_Table_Exception');
         } catch (Zend_Exception $e) {
             $this->assertType('Zend_Db_Table_Exception', $e,
@@ -539,7 +540,7 @@ abstract class Zend_Db_Table_TestCommon extends Zend_Db_Table_TestSetup
          */
         Zend_Registry::set('registered_db', 327);
         try {
-            $table = new Zend_Db_Table_TableBugs(array('db' => 'registered_db'));
+            $table = new My_ZendDbTable_TableBugs(array('db' => 'registered_db'));
             $this->fail('Expected to catch Zend_Db_Table_Exception');
         } catch (Zend_Exception $e) {
             $this->assertType('Zend_Db_Table_Exception', $e,
@@ -647,7 +648,7 @@ abstract class Zend_Db_Table_TestCommon extends Zend_Db_Table_TestSetup
         $schemaName = $this->_util->getSchema();
         $tableName = 'zfbugs';
         $identifier = join('.', array_filter(array($schemaName, $tableName)));
-        $table = $this->_getTable('Zend_Db_Table_TableSpecial',
+        $table = $this->_getTable('My_ZendDbTable_TableSpecial',
             array('name' => $tableName, 'schema' => $schemaName)
         );
 
@@ -673,7 +674,7 @@ abstract class Zend_Db_Table_TestCommon extends Zend_Db_Table_TestSetup
 
     public function testTableInsertSequence()
     {
-        $table = $this->_getTable('Zend_Db_Table_TableProducts',
+        $table = $this->_getTable('My_ZendDbTable_TableProducts',
             array(Zend_Db_Table_Abstract::SEQUENCE => 'zfproducts_seq'));
 
         $row = array (
@@ -815,7 +816,7 @@ abstract class Zend_Db_Table_TestCommon extends Zend_Db_Table_TestSetup
         $schemaName = $this->_util->getSchema();
         $tableName = 'zfbugs';
         $identifier = join('.', array_filter(array($schemaName, $tableName)));
-        $table = $this->_getTable('Zend_Db_Table_TableSpecial',
+        $table = $this->_getTable('My_ZendDbTable_TableSpecial',
             array('name' => $tableName, 'schema' => $schemaName)
         );
 
@@ -881,7 +882,7 @@ abstract class Zend_Db_Table_TestCommon extends Zend_Db_Table_TestSetup
         $schemaName = $this->_util->getSchema();
         $tableName = 'zfbugs';
         $identifier = join('.', array_filter(array($schemaName, $tableName)));
-        $table = $this->_getTable('Zend_Db_Table_TableSpecial',
+        $table = $this->_getTable('My_ZendDbTable_TableSpecial',
             array('name' => $tableName, 'schema' => $schemaName)
         );
 
@@ -1196,32 +1197,34 @@ abstract class Zend_Db_Table_TestCommon extends Zend_Db_Table_TestSetup
 
     public function testTableLoadsCustomRowClass()
     {
-        if (class_exists('Zend_Db_Table_Row_TestMyRow')) {
+        $this->_useMyIncludePath();
+        
+        if (class_exists('My_ZendDbTable_Row_TestMyRow')) {
             $this->markTestSkipped("Cannot test loading the custom Row class because it is already loaded");
             return;
         }
 
-        $this->assertFalse(class_exists('Zend_Db_Table_Row_TestMyRow', false),
+        $this->assertFalse(class_exists('My_ZendDbTable_Row_TestMyRow', false),
             'Expected TestMyRow class not to be loaded (#1)');
-        $this->assertFalse(class_exists('Zend_Db_Table_Rowset_TestMyRowset', false),
+        $this->assertFalse(class_exists('My_ZendDbTable_Rowset_TestMyRowset', false),
             'Expected TestMyRowset class not to be loaded (#1)');
 
         // instantiating the table does not creat a rowset
         // so the custom classes are not loaded yet
-        $bugsTable = $this->_getTable('Zend_Db_Table_TableBugsCustom');
+        $bugsTable = $this->_getTable('My_ZendDbTable_TableBugsCustom');
 
-        $this->assertFalse(class_exists('Zend_Db_Table_Row_TestMyRow', false),
+        $this->assertFalse(class_exists('My_ZendDbTable_Row_TestMyRow', false),
             'Expected TestMyRow class not to be loaded (#2)');
-        $this->assertFalse(class_exists('Zend_Db_Table_Rowset_TestMyRowset', false),
+        $this->assertFalse(class_exists('My_ZendDbTable_Rowset_TestMyRowset', false),
             'Expected TestMyRowset class not to be loaded (#2)');
-
+        
         // creating a rowset makes the table load the rowset class
         // and the rowset constructor loads the row class.
         $bugs = $bugsTable->fetchAll();
 
-        $this->assertTrue(class_exists('Zend_Db_Table_Row_TestMyRow', false),
+        $this->assertTrue(class_exists('My_ZendDbTable_Row_TestMyRow', false),
             'Expected TestMyRow class to be loaded (#3)');
-        $this->assertTrue(class_exists('Zend_Db_Table_Rowset_TestMyRowset', false),
+        $this->assertTrue(class_exists('My_ZendDbTable_Rowset_TestMyRowset', false),
             'Expected TestMyRowset class to be loaded (#3)');
     }
 
@@ -1258,7 +1261,7 @@ abstract class Zend_Db_Table_TestCommon extends Zend_Db_Table_TestSetup
         Zend_Registry::set('registered_metadata_cache', $cache);
 
         $tableBugsCustom1 = $this->_getTable(
-            'Zend_Db_Table_TableBugsCustom',
+            'My_ZendDbTable_TableBugsCustom',
             array('metadataCache' => 'registered_metadata_cache')
         );
 
@@ -1271,7 +1274,7 @@ abstract class Zend_Db_Table_TestCommon extends Zend_Db_Table_TestSetup
         Zend_Db_Table_Abstract::setDefaultMetadataCache($cache);
 
         try {
-            $bugsTable = $this->_getTable('Zend_Db_Table_TableBugs');
+            $bugsTable = $this->_getTable('My_ZendDbTable_TableBugs');
             $primary = $bugsTable->info(Zend_Db_Table_Abstract::PRIMARY);
             $this->fail('Expected to catch Zend_Db_Table_Exception');
         } catch (Zend_Exception $e) {
@@ -1293,7 +1296,7 @@ abstract class Zend_Db_Table_TestCommon extends Zend_Db_Table_TestSetup
         $cache = $this->_getCache();
 
         $tableBugsCustom1 = $this->_getTable(
-            'Zend_Db_Table_TableBugsCustom',
+            'My_ZendDbTable_TableBugsCustom',
             array('metadataCache' => $cache)
         );
 
@@ -1327,7 +1330,7 @@ abstract class Zend_Db_Table_TestCommon extends Zend_Db_Table_TestSetup
         $cache = $this->_getCache();
 
         $tableBugsCustom1 = $this->_getTable(
-            'Zend_Db_Table_TableBugsCustom',
+            'My_ZendDbTable_TableBugsCustom',
             array(
                 'metadataCache'        => $cache,
                 'metadataCacheInClass' => true,
@@ -1364,7 +1367,7 @@ abstract class Zend_Db_Table_TestCommon extends Zend_Db_Table_TestSetup
 
         Zend_Db_Table_Abstract::setDefaultMetadataCache($cache);
 
-        $tableBugsCustom1 = $this->_getTable('Zend_Db_Table_TableBugsCustom');
+        $tableBugsCustom1 = $this->_getTable('My_ZendDbTable_TableBugsCustom');
 
         $this->assertFalse($tableBugsCustom1->isMetadataFromCache);
 
@@ -1407,13 +1410,13 @@ abstract class Zend_Db_Table_TestCommon extends Zend_Db_Table_TestSetup
 
     public function testTableMetadataCacheException()
     {
-        Zend_Loader::loadClass('Zend_Db_Table_TableBugs');
+        Zend_Loader::loadClass('My_ZendDbTable_TableBugs');
 
         /**
          * options array points 'metadataCache' to integer scalar
          */
         try {
-            $table = new Zend_Db_Table_TableBugs(array('metadataCache' => 327));
+            $table = new My_ZendDbTable_TableBugs(array('metadataCache' => 327));
             $this->fail('Expected to catch Zend_Db_Table_Exception');
         } catch (Zend_Exception $e) {
             $this->assertType('Zend_Db_Table_Exception', $e,
@@ -1426,7 +1429,7 @@ abstract class Zend_Db_Table_TestCommon extends Zend_Db_Table_TestSetup
          */
         Zend_Registry::set('registered_metadata_cache', 327);
         try {
-            $table = new Zend_Db_Table_TableBugs(array('metadataCache' => 'registered_metadata_cache'));
+            $table = new My_ZendDbTable_TableBugs(array('metadataCache' => 'registered_metadata_cache'));
             $this->fail('Expected to catch Zend_Db_Table_Exception');
         } catch (Zend_Exception $e) {
             $this->assertType('Zend_Db_Table_Exception', $e,
@@ -1439,12 +1442,12 @@ abstract class Zend_Db_Table_TestCommon extends Zend_Db_Table_TestSetup
     {
         $table = $this->_table['products'];
         $row1 = $table->find(1)->current();
-        $rows1 = $row1->findManyToManyRowset('Zend_Db_Table_TableBugs', 'Zend_Db_Table_TableBugsProducts');
+        $rows1 = $row1->findManyToManyRowset('My_ZendDbTable_TableBugs', 'My_ZendDbTable_TableBugsProducts');
 
         $product_id = $this->_db->foldCase('product_id');
         $row1->$product_id = 999999;
         $row1->save();
-        $rows2 = $row1->findManyToManyRowset('Zend_Db_Table_TableBugs', 'Zend_Db_Table_TableBugsProducts');
+        $rows2 = $row1->findManyToManyRowset('My_ZendDbTable_TableBugs', 'My_ZendDbTable_TableBugsProducts');
 
         $this->assertEquals(999999, $row1->$product_id);
         $this->assertEquals(count($rows1), count($rows2));
@@ -1505,7 +1508,7 @@ abstract class Zend_Db_Table_TestCommon extends Zend_Db_Table_TestSetup
          */
         require_once 'Zend/Cache.php';
 
-        $folder = dirname(__FILE__) . DIRECTORY_SEPARATOR . '_files';
+        $folder = dirname(__FILE__) . DIRECTORY_SEPARATOR . '_files' . DIRECTORY_SEPARATOR . 'cachefiles';
 
         $frontendOptions = array(
             'automatic_serialization' => true
@@ -1535,7 +1538,7 @@ abstract class Zend_Db_Table_TestCommon extends Zend_Db_Table_TestSetup
          */
         require_once 'Zend/Cache.php';
 
-        $folder = dirname(__FILE__) . DIRECTORY_SEPARATOR . '_nofiles';
+        $folder = dirname(__FILE__) . DIRECTORY_SEPARATOR . '_files' . DIRECTORY_SEPARATOR . 'nofiles';
         if (!file_exists($folder)) {
             mkdir($folder, 0777);
         }

+ 30 - 5
tests/Zend/Db/Table/TestSetup.php

@@ -46,24 +46,49 @@ abstract class Zend_Db_Table_TestSetup extends Zend_Db_TestSetup
      */
     protected $_table = array();
 
+    protected $_runtimeIncludePath = null;
+    
     public function setUp()
     {
         parent::setUp();
 
-        $this->_table['accounts']      = $this->_getTable('Zend_Db_Table_TableAccounts');
-        $this->_table['bugs']          = $this->_getTable('Zend_Db_Table_TableBugs');
-        $this->_table['bugs_products'] = $this->_getTable('Zend_Db_Table_TableBugsProducts');
-        $this->_table['products']      = $this->_getTable('Zend_Db_Table_TableProducts');
+        $this->_table['accounts']      = $this->_getTable('My_ZendDbTable_TableAccounts');
+        $this->_table['bugs']          = $this->_getTable('My_ZendDbTable_TableBugs');
+        $this->_table['bugs_products'] = $this->_getTable('My_ZendDbTable_TableBugsProducts');
+        $this->_table['products']      = $this->_getTable('My_ZendDbTable_TableProducts');
     }
 
+    public function tearDown()
+    {
+        if ($this->_runtimeIncludePath) {
+            $this->_restoreIncludePath();
+        }
+    }
+    
     protected function _getTable($tableClass, $options = array())
     {
         if (is_array($options) && !isset($options['db'])) {
             $options['db'] = $this->_db;
         }
-        Zend_Loader::loadClass($tableClass);
+        if (!class_exists($tableClass)) {
+            $this->_useMyIncludePath();
+            Zend_Loader::loadClass($tableClass);
+            $this->_restoreIncludePath();
+        }
         $table = new $tableClass($options);
         return $table;
     }
+    
+    protected function _useMyIncludePath()
+    {
+        $this->_runtimeIncludePath = get_include_path();
+        set_include_path(dirname(__FILE__) . '/_files/' . PATH_SEPARATOR . $this->_runtimeIncludePath);
+    }
+    
+    protected function _restoreIncludePath()
+    {
+        set_include_path($this->_runtimeIncludePath);
+        $this->_runtimeIncludePath = null;
+    }
 
 }

+ 2 - 2
tests/Zend/Db/Table/Row/TestMockRow.php → tests/Zend/Db/Table/_files/My/ZendDbTable/Row/TestMockRow.php

@@ -18,7 +18,7 @@
  * @subpackage UnitTests
  * @copyright  Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
- * @version    $Id$
+ * @version    $Id: TestMockRow.php 12004 2008-10-18 14:29:41Z mikaelkael $
  */
 
 
@@ -36,7 +36,7 @@ PHPUnit_Util_Filter::addFileToFilter(__FILE__);
  * @copyright  Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
  */
-class Zend_Db_Table_Row_TestMockRow extends Zend_Db_Table_Row_Abstract
+class My_ZendDbTable_Row_TestMockRow extends Zend_Db_Table_Row_Abstract
 {
 
     public $parentTable       = null;

+ 2 - 2
tests/Zend/Db/Table/Row/TestMyRow.php → tests/Zend/Db/Table/_files/My/ZendDbTable/Row/TestMyRow.php

@@ -18,7 +18,7 @@
  * @subpackage UnitTests
  * @copyright  Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
- * @version    $Id$
+ * @version    $Id: TestMyRow.php 12004 2008-10-18 14:29:41Z mikaelkael $
  */
 
 
@@ -36,5 +36,5 @@ PHPUnit_Util_Filter::addFileToFilter(__FILE__);
  * @copyright  Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
  */
-class Zend_Db_Table_Row_TestMyRow extends Zend_Db_Table_Row_Abstract
+class My_ZendDbTable_Row_TestMyRow extends Zend_Db_Table_Row_Abstract
 {}

+ 3 - 3
tests/Zend/Db/Table/Row/TestStandaloneRow.php → tests/Zend/Db/Table/_files/My/ZendDbTable/Row/TestStandaloneRow.php

@@ -17,7 +17,7 @@
  * @subpackage UnitTests
  * @copyright  Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
- * @version    $Id$
+ * @version    $Id: TestStandaloneRow.php 13552 2009-01-08 14:53:09Z norm2782 $
  */
 
 
@@ -35,7 +35,7 @@ PHPUnit_Util_Filter::addFileToFilter(__FILE__);
  * @copyright  Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
  */
-class Zend_Db_Table_Row_TestStandaloneRow extends Zend_Db_Table_Row_Abstract
+class My_ZendDbTable_Row_TestStandaloneRow extends Zend_Db_Table_Row_Abstract
 {
-    protected $_tableClass = 'Zend_Db_Table_TableBugs';
+    protected $_tableClass = 'My_ZendDbTable_TableBugs';
 }

+ 3 - 3
tests/Zend/Db/Table/Row/TestTableRow.php → tests/Zend/Db/Table/_files/My/ZendDbTable/Row/TestTableRow.php

@@ -18,7 +18,7 @@
  * @subpackage UnitTests
  * @copyright  Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
- * @version    $Id$
+ * @version    $Id: TestTableRow.php 12004 2008-10-18 14:29:41Z mikaelkael $
  */
 
 
@@ -36,9 +36,9 @@ PHPUnit_Util_Filter::addFileToFilter(__FILE__);
  * @copyright  Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
  */
-class Zend_Db_Table_Row_TestTableRow extends Zend_Db_Table_Row_Abstract
+class My_ZendDbTable_Row_TestTableRow extends Zend_Db_Table_Row_Abstract
 {
-    protected $_tableClass = 'Zend_Db_Table_TableBugs';
+    protected $_tableClass = 'My_ZendDbTable_TableBugs';
 
     public function setInvalidColumn()
     {

+ 2 - 2
tests/Zend/Db/Table/Rowset/TestMyRowset.php → tests/Zend/Db/Table/_files/My/ZendDbTable/Rowset/TestMyRowset.php

@@ -18,7 +18,7 @@
  * @subpackage UnitTests
  * @copyright  Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
- * @version    $Id$
+ * @version    $Id: TestMyRowset.php 12004 2008-10-18 14:29:41Z mikaelkael $
  */
 
 
@@ -36,5 +36,5 @@ PHPUnit_Util_Filter::addFileToFilter(__FILE__);
  * @copyright  Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
  */
-class Zend_Db_Table_Rowset_TestMyRowset extends Zend_Db_Table_Rowset_Abstract
+class My_ZendDbTable_Rowset_TestMyRowset extends Zend_Db_Table_Rowset_Abstract
 {}

+ 8 - 2
tests/Zend/Db/Table/TableAccounts.php → tests/Zend/Db/Table/_files/My/ZendDbTable/TableAccounts.php

@@ -27,6 +27,12 @@
  */
 require_once 'Zend/Db/Table/Abstract.php';
 
+/**
+ * require other test files needed, this will
+ * ensure that Zend_Loader::loadClass is not called
+ */
+require_once 'TableBugs.php';
+
 
 PHPUnit_Util_Filter::addFileToFilter(__FILE__);
 
@@ -38,8 +44,8 @@ PHPUnit_Util_Filter::addFileToFilter(__FILE__);
  * @copyright  Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
  */
-class Zend_Db_Table_TableAccounts extends Zend_Db_Table_Abstract
+class My_ZendDbTable_TableAccounts extends Zend_Db_Table_Abstract
 {
     protected $_name = 'zfaccounts';
-    protected $_dependentTables = array('Zend_Db_Table_TableBugs');
+    protected $_dependentTables = array('My_ZendDbTable_TableBugs');
 }

+ 55 - 0
tests/Zend/Db/Table/_files/My/ZendDbTable/TableAccountsCustom.php

@@ -0,0 +1,55 @@
+<?php
+
+/**
+ * Zend Framework
+ *
+ * LICENSE
+ *
+ * This source file is subject to the new BSD license that is bundled
+ * with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://framework.zend.com/license/new-bsd
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@zend.com so we can send you a copy immediately.
+ *
+ * @category   Zend
+ * @package    Zend_Db
+ * @subpackage UnitTests
+ * @copyright  Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license    http://framework.zend.com/license/new-bsd     New BSD License
+ * @version    $Id$
+ */
+
+
+/**
+ * @see My_ZendDbTable_TableAccounts
+ */
+require_once 'TableAccounts.php';
+
+
+/**
+ * require other test files needed, this will
+ * ensure that Zend_Loader::loadClass is not called
+ */
+require_once 'TableBugsCustom.php';
+
+
+
+PHPUnit_Util_Filter::addFileToFilter(__FILE__);
+
+
+/**
+ * @category   Zend
+ * @package    Zend_Db
+ * @subpackage UnitTests
+ * @copyright  Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license    http://framework.zend.com/license/new-bsd     New BSD License
+ */
+class My_ZendDbTable_TableAccountsCustom extends My_ZendDbTable_TableAccounts
+{
+    protected $_rowClass    = 'My_ZendDbTable_Row_TestMyRow';
+    protected $_rowsetClass = 'My_ZendDbTable_Rowset_TestMyRowset';
+
+    protected $_dependentTables = array('My_ZendDbTable_TableBugsCustom');
+}

+ 11 - 5
tests/Zend/Db/Table/TableBugs.php → tests/Zend/Db/Table/_files/My/ZendDbTable/TableBugs.php

@@ -27,6 +27,12 @@
  */
 require_once 'Zend/Db/Table/Abstract.php';
 
+/**
+ * require other test files needed, this will
+ * ensure that Zend_Loader::loadClass is not called
+ */
+require_once 'TableBugsProducts.php';
+require_once 'TableAccounts.php';
 
 PHPUnit_Util_Filter::addFileToFilter(__FILE__);
 
@@ -38,28 +44,28 @@ PHPUnit_Util_Filter::addFileToFilter(__FILE__);
  * @copyright  Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
  */
-class Zend_Db_Table_TableBugs extends Zend_Db_Table_Abstract
+class My_ZendDbTable_TableBugs extends Zend_Db_Table_Abstract
 {
 
     protected $_name = 'zfbugs';
     protected $_primary = 'bug_id'; // Deliberate non-array value
 
-    protected $_dependentTables = array('Zend_Db_Table_TableBugsProducts');
+    protected $_dependentTables = array('My_ZendDbTable_TableBugsProducts');
 
     protected $_referenceMap    = array(
         'Reporter' => array(
             'columns'           => array('reported_by'),
-            'refTableClass'     => 'Zend_Db_Table_TableAccounts',
+            'refTableClass'     => 'My_ZendDbTable_TableAccounts',
             'refColumns'        => array('account_name')
         ),
         'Engineer' => array(
             'columns'           => array('assigned_to'),
-            'refTableClass'     => 'Zend_Db_Table_TableAccounts',
+            'refTableClass'     => 'My_ZendDbTable_TableAccounts',
             'refColumns'        => array('account_name')
         ),
         'Verifier' => array(
             'columns'           => array('verified_by'),
-            'refTableClass'     => 'Zend_Db_Table_TableAccounts',
+            'refTableClass'     => 'My_ZendDbTable_TableAccounts',
             'refColumns'        => array('account_name')
         )
     );

+ 13 - 9
tests/Zend/Db/Table/TableBugsCustom.php → tests/Zend/Db/Table/_files/My/ZendDbTable/TableBugsCustom.php

@@ -23,9 +23,13 @@
 
 
 /**
- * @see Zend_Db_Table_TableBugs
+ * require other test files needed, this will
+ * ensure that Zend_Loader::loadClass is not called
  */
-require_once 'Zend/Db/Table/TableBugs.php';
+require_once 'TableBugs.php';
+require_once 'TableBugsProductsCustom.php';
+require_once 'TableAccountsCustom.php';
+
 
 
 PHPUnit_Util_Filter::addFileToFilter(__FILE__);
@@ -38,33 +42,33 @@ PHPUnit_Util_Filter::addFileToFilter(__FILE__);
  * @copyright  Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
  */
-class Zend_Db_Table_TableBugsCustom extends Zend_Db_Table_TableBugs
+class My_ZendDbTable_TableBugsCustom extends My_ZendDbTable_TableBugs
 {
     public $isMetadataFromCache = false;
 
     protected $_metadataCacheInClass = false;
 
-    protected $_rowClass    = 'Zend_Db_Table_Row_TestMyRow';
-    protected $_rowsetClass = 'Zend_Db_Table_Rowset_TestMyRowset';
+    protected $_rowClass    = 'My_ZendDbTable_Row_TestMyRow';
+    protected $_rowsetClass = 'My_ZendDbTable_Rowset_TestMyRowset';
 
-    protected $_dependentTables = array('Zend_Db_Table_TableBugsProductsCustom');
+    protected $_dependentTables = array('My_ZendDbTable_TableBugsProductsCustom');
 
     protected $_referenceMap    = array(
         'Reporter' => array(
             'columns'           => array('reported_by'),
-            'refTableClass'     => 'Zend_Db_Table_TableAccountsCustom',
+            'refTableClass'     => 'My_ZendDbTable_TableAccountsCustom',
             'refColumns'        => array('account_name'),
             'onDelete'          => self::CASCADE,
             'onUpdate'          => self::CASCADE
         ),
         'Engineer' => array(
             'columns'           => 'assigned_to',
-            'refTableClass'     => 'Zend_Db_Table_TableAccountsCustom',
+            'refTableClass'     => 'My_ZendDbTable_TableAccountsCustom',
             'refColumns'        => 'account_name'
         ),
         'Verifier' => array(
             'columns'           => 'verified_by',
-            'refTableClass'     => 'Zend_Db_Table_TableAccountsCustom',
+            'refTableClass'     => 'My_ZendDbTable_TableAccountsCustom',
             'refColumns'        => 'account_name'
         )
     );

+ 9 - 3
tests/Zend/Db/Table/TableBugsProducts.php → tests/Zend/Db/Table/_files/My/ZendDbTable/TableBugsProducts.php

@@ -27,6 +27,12 @@
  */
 require_once 'Zend/Db/Table/Abstract.php';
 
+/**
+ * require other test files needed, this will
+ * ensure that Zend_Loader::loadClass is not called
+ */
+require_once 'TableBugs.php';
+require_once 'TableProducts.php';
 
 PHPUnit_Util_Filter::addFileToFilter(__FILE__);
 
@@ -38,21 +44,21 @@ PHPUnit_Util_Filter::addFileToFilter(__FILE__);
  * @copyright  Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
  */
-class Zend_Db_Table_TableBugsProducts extends Zend_Db_Table_Abstract
+class My_ZendDbTable_TableBugsProducts extends Zend_Db_Table_Abstract
 {
     protected $_name    = 'zfbugs_products';
 
     protected $_referenceMap    = array(
         'Bug' => array(
             'columns'           => 'bug_id', // Deliberate non-array value
-            'refTableClass'     => 'Zend_Db_Table_TableBugs',
+            'refTableClass'     => 'My_ZendDbTable_TableBugs',
             'refColumns'        => array('bug_id'),
             'onDelete'          => -1, // Deliberate false value
             'onUpdate'          => -1 // Deliberate false value
         ),
         'Product' => array(
             'columns'           => array('product_id'),
-            'refTableClass'     => 'Zend_Db_Table_TableProducts',
+            'refTableClass'     => 'My_ZendDbTable_TableProducts',
             'refColumns'        => array('product_id'),
             'onDelete'          => self::CASCADE,
             'onUpdate'          => self::CASCADE

+ 9 - 19
tests/Zend/Db/Table/TableBugsProductsCustom.php → tests/Zend/Db/Table/_files/My/ZendDbTable/TableBugsProductsCustom.php

@@ -23,21 +23,11 @@
 
 
 /**
- * @see Zend_Db_Table_TableBugsProducts
+ * require other test files needed, this will
+ * ensure that Zend_Loader::loadClass is not called
  */
-require_once 'Zend/Db/Table/TableBugsProducts.php';
-
-
-/**
- * @see Zend_Db_Table_Row_TestMyRow
- */
-require_once 'Zend/Db/Table/Row/TestMyRow.php';
-
-
-/**
- * @see Zend_Db_Table_Row_TestMyRowset
- */
-require_once 'Zend/Db/Table/Rowset/TestMyRowset.php';
+require_once 'TableBugsProducts.php';
+require_once 'TableBugsCustom.php';
 
 
 PHPUnit_Util_Filter::addFileToFilter(__FILE__);
@@ -50,22 +40,22 @@ PHPUnit_Util_Filter::addFileToFilter(__FILE__);
  * @copyright  Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
  */
-class Zend_Db_Table_TableBugsProductsCustom extends Zend_Db_Table_TableBugsProducts
+class My_ZendDbTable_TableBugsProductsCustom extends My_ZendDbTable_TableBugsProducts
 {
-    protected $_rowClass    = 'Zend_Db_Table_Row_TestMyRow';
-    protected $_rowsetClass = 'Zend_Db_Table_Rowset_TestMyRowset';
+    protected $_rowClass    = 'My_ZendDbTable_Row_TestMyRow';
+    protected $_rowsetClass = 'My_ZendDbTable_Rowset_TestMyRowset';
 
     protected $_referenceMap    = array(
         'Bug' => array(
             'columns'           => 'bug_id',
-            'refTableClass'     => 'Zend_Db_Table_TableBugsCustom',
+            'refTableClass'     => 'My_ZendDbTable_TableBugsCustom',
             'refColumns'        => 'bug_id',
             'onDelete'          => self::CASCADE,
             'onUpdate'          => self::CASCADE
         ),
         'Product' => array(
             'columns'           => 'product_id',
-            'refTableClass'     => 'Zend_Db_Table_TableProductsCustom',
+            'refTableClass'     => 'My_ZendDbTable_TableProductsCustom',
             'refColumns'        => 'product_id',
             'onDelete'          => 'anything but self::CASCADE',
             'onUpdate'          => 'anything but self::CASCADE'

+ 8 - 2
tests/Zend/Db/Table/TableProducts.php → tests/Zend/Db/Table/_files/My/ZendDbTable/TableProducts.php

@@ -27,6 +27,12 @@
  */
 require_once 'Zend/Db/Table/Abstract.php';
 
+/**
+ * require other test files needed, this will
+ * ensure that Zend_Loader::loadClass is not called
+ */
+require_once 'TableBugsProducts.php';
+
 
 PHPUnit_Util_Filter::addFileToFilter(__FILE__);
 
@@ -38,8 +44,8 @@ PHPUnit_Util_Filter::addFileToFilter(__FILE__);
  * @copyright  Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
  */
-class Zend_Db_Table_TableProducts extends Zend_Db_Table_Abstract
+class My_ZendDbTable_TableProducts extends Zend_Db_Table_Abstract
 {
     protected $_name = 'zfproducts';
-    protected $_dependentTables = array('Zend_Db_Table_TableBugsProducts');
+    protected $_dependentTables = array('My_ZendDbTable_TableBugsProducts');
 }

+ 48 - 0
tests/Zend/Db/Table/_files/My/ZendDbTable/TableProductsCustom.php

@@ -0,0 +1,48 @@
+<?php
+
+/**
+ * Zend Framework
+ *
+ * LICENSE
+ *
+ * This source file is subject to the new BSD license that is bundled
+ * with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://framework.zend.com/license/new-bsd
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@zend.com so we can send you a copy immediately.
+ *
+ * @category   Zend
+ * @package    Zend_Db
+ * @subpackage UnitTests
+ * @copyright  Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license    http://framework.zend.com/license/new-bsd     New BSD License
+ * @version    $Id$
+ */
+
+
+/**
+ * require other test files needed, this will
+ * ensure that Zend_Loader::loadClass is not called
+ */
+require_once 'TableProducts.php';
+require_once 'TableBugsProductsCustom.php';
+
+PHPUnit_Util_Filter::addFileToFilter(__FILE__);
+
+
+/**
+ * @category   Zend
+ * @package    Zend_Db
+ * @subpackage UnitTests
+ * @copyright  Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license    http://framework.zend.com/license/new-bsd     New BSD License
+ */
+class My_ZendDbTable_TableProductsCustom extends My_ZendDbTable_TableProducts
+{
+    protected $_rowClass    = 'My_ZendDbTable_Row_TestMyRow';
+    protected $_rowsetClass = 'My_ZendDbTable_Rowset_TestMyRowset';
+
+    protected $_dependentTables = array('My_ZendDbTable_TableBugsProductsCustom');
+}

+ 1 - 1
tests/Zend/Db/Table/TableSpecial.php → tests/Zend/Db/Table/_files/My/ZendDbTable/TableSpecial.php

@@ -31,7 +31,7 @@ require_once 'Zend/Db/Table/Abstract.php';
 PHPUnit_Util_Filter::addFileToFilter(__FILE__);
 
 
-class Zend_Db_Table_TableSpecial extends Zend_Db_Table_Abstract
+class My_ZendDbTable_TableSpecial extends Zend_Db_Table_Abstract
 {
     // no configuration declared
 }

+ 1 - 1
tests/Zend/Db/TestUtil/Common.php

@@ -223,7 +223,7 @@ abstract class Zend_Db_TestUtil_Common
         'noprimarykey'  => 'zfnoprimarykey',
         'Documents'     => 'zfdocuments',
         'Price'         => 'zfprice',
-        'AltBugsProducts' => 'zfalt_bugs_products',
+        'AltBugsProducts' => 'zfalt_bugs_products'
     );
 
     public function getTableName($tableId)