TableBugs.php 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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-2010 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_Abstract
  24. */
  25. require_once 'Zend/Db/Table/Abstract.php';
  26. /**
  27. * require other test files needed, this will
  28. * ensure that Zend_Loader::loadClass is not called
  29. */
  30. require_once 'TableBugsProducts.php';
  31. require_once 'TableAccounts.php';
  32. PHPUnit_Util_Filter::addFileToFilter(__FILE__);
  33. /**
  34. * @category Zend
  35. * @package Zend_Db
  36. * @subpackage UnitTests
  37. * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
  38. * @license http://framework.zend.com/license/new-bsd New BSD License
  39. */
  40. class My_ZendDbTable_TableBugs extends Zend_Db_Table_Abstract
  41. {
  42. protected $_name = 'zfbugs';
  43. protected $_primary = 'bug_id'; // Deliberate non-array value
  44. protected $_dependentTables = array('My_ZendDbTable_TableBugsProducts');
  45. protected $_referenceMap = array(
  46. 'Reporter' => array(
  47. 'columns' => array('reported_by'),
  48. 'refTableClass' => 'My_ZendDbTable_TableAccounts',
  49. 'refColumns' => array('account_name')
  50. ),
  51. 'Engineer' => array(
  52. 'columns' => array('assigned_to'),
  53. 'refTableClass' => 'My_ZendDbTable_TableAccounts',
  54. 'refColumns' => array('account_name')
  55. ),
  56. 'Verifier' => array(
  57. 'columns' => array('verified_by'),
  58. 'refTableClass' => 'My_ZendDbTable_TableAccounts',
  59. 'refColumns' => array('account_name')
  60. )
  61. );
  62. }