TableBugsCustom.php 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. <?php
  2. /**
  3. * Zend Framework
  4. *
  5. * LICENSE
  6. *
  7. * This source file is subject to the new BSD license that is bundled
  8. * with this package in the file LICENSE.txt.
  9. * It is also available through the world-wide-web at this URL:
  10. * http://framework.zend.com/license/new-bsd
  11. * If you did not receive a copy of the license and are unable to
  12. * obtain it through the world-wide-web, please send an email
  13. * to license@zend.com so we can send you a copy immediately.
  14. *
  15. * @category Zend
  16. * @package Zend_Db
  17. * @subpackage UnitTests
  18. * @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
  19. * @license http://framework.zend.com/license/new-bsd New BSD License
  20. * @version $Id$
  21. */
  22. /**
  23. * @see Zend_Db_Table_TableBugs
  24. */
  25. require_once 'Zend/Db/Table/TableBugs.php';
  26. PHPUnit_Util_Filter::addFileToFilter(__FILE__);
  27. /**
  28. * @category Zend
  29. * @package Zend_Db
  30. * @subpackage UnitTests
  31. * @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
  32. * @license http://framework.zend.com/license/new-bsd New BSD License
  33. */
  34. class Zend_Db_Table_TableBugsCustom extends Zend_Db_Table_TableBugs
  35. {
  36. public $isMetadataFromCache = false;
  37. protected $_metadataCacheInClass = false;
  38. protected $_rowClass = 'Zend_Db_Table_Row_TestMyRow';
  39. protected $_rowsetClass = 'Zend_Db_Table_Rowset_TestMyRowset';
  40. protected $_dependentTables = array('Zend_Db_Table_TableBugsProductsCustom');
  41. protected $_referenceMap = array(
  42. 'Reporter' => array(
  43. 'columns' => array('reported_by'),
  44. 'refTableClass' => 'Zend_Db_Table_TableAccountsCustom',
  45. 'refColumns' => array('account_name'),
  46. 'onDelete' => self::CASCADE,
  47. 'onUpdate' => self::CASCADE
  48. ),
  49. 'Engineer' => array(
  50. 'columns' => 'assigned_to',
  51. 'refTableClass' => 'Zend_Db_Table_TableAccountsCustom',
  52. 'refColumns' => 'account_name'
  53. ),
  54. 'Verifier' => array(
  55. 'columns' => 'verified_by',
  56. 'refTableClass' => 'Zend_Db_Table_TableAccountsCustom',
  57. 'refColumns' => 'account_name'
  58. )
  59. );
  60. /**
  61. * Public proxy to setup functionality
  62. *
  63. * @return void
  64. */
  65. public function setup()
  66. {
  67. $this->_setup();
  68. }
  69. /**
  70. * Turnkey for initialization of a table object.
  71. *
  72. * @return void
  73. */
  74. protected function _setup()
  75. {
  76. $this->_setupDatabaseAdapter();
  77. $this->_setupTableName();
  78. $this->isMetadataFromCache = $this->_setupMetadata();
  79. $this->_setupPrimaryKey();
  80. }
  81. }