Newer
Older
sqlmarker / BDL / Test_classes / Component / BDL_Test_Component.php
  1. <?php
  2. require_once "Schema.php";
  3.  
  4. abstract class BDL_Test_Component extends PHPUnit_Extensions_Database_TestCase_CreateTable
  5. {
  6. public function getTableName()
  7. {
  8. return 'COMPONENT';
  9. }
  10. public function getColumnList()
  11. {
  12. return array(
  13. 'COMPONENT_CODE' => array( 'generic_type' => 'NUMBER',
  14. 'sql_type' => array( 'NUMBER', 'INTEGER' ),
  15. 'min_length' => 8,
  16. 'max_length' => 8,
  17. 'decimals' => 0,
  18. 'nullable' => false,
  19. 'test_value' => "87654321", ),
  20. 'SUPPLIERS_CODE' => array( 'generic_type' => 'TEXT',
  21. 'sql_type' => array( 'VARCHAR2', 'VARCHAR' ),
  22. 'min_length' => 25,
  23. 'max_length' => 25,
  24. 'nullable' => false,
  25. 'test_value' => "B87654321", ),
  26. 'DESCRIPTION' => array( 'generic_type' => 'TEXT',
  27. 'sql_type' => array( 'VARCHAR2', 'VARCHAR' ),
  28. 'min_length' => 100,
  29. 'max_length' => 100,
  30. 'nullable' => false,
  31. 'test_value' => "Some component", ),
  32. 'STOCK_COUNT' => array( 'generic_type' => 'NUMBER',
  33. 'sql_type' => array( 'NUMBER', 'INTEGER' ),
  34. 'min_length' => 7,
  35. 'max_length' => 8,
  36. 'decimals' => 0,
  37. 'underflow' => -1,
  38. 'overflow' => 10000000,
  39. 'nullable' => false,
  40. 'test_value' => "456", ),
  41. 'SUPPLIER_ID' => array( 'generic_type' => 'NUMBER',
  42. 'sql_type' => array( 'NUMBER', 'INTEGER' ),
  43. 'min_length' => 7,
  44. 'max_length' => 7,
  45. 'decimals' => 0,
  46. 'nullable' => false,
  47. 'test_value' => "1", ), );
  48. }
  49. public function getPKColumnList()
  50. {
  51. return array( 'COMPONENT_CODE' );
  52. }
  53. public function getFKColumnList()
  54. {
  55. return array( 'SUPPLIER' => array ( 'SUPPLIER_ID' ) );
  56. }
  57. public function getUniqueColumnList()
  58. {
  59. return array();
  60. }
  61. }
  62. ?>