Newer
Older
sqlmarker / BDL / Test_classes / Supplier / BDL_Test_Supplier.php
  1. <?php
  2. require_once "Schema.php";
  3.  
  4. abstract class BDL_Test_Supplier extends PHPUnit_Extensions_Database_TestCase_CreateTable
  5. {
  6. public function getTableName()
  7. {
  8. return 'SUPPLIER';
  9. }
  10. public function getColumnList()
  11. {
  12. return array(
  13. 'SUPPLIER_ID' => array( 'generic_type' => 'NUMBER',
  14. 'sql_type' => array( 'NUMBER', 'INTEGER' ),
  15. 'min_length' => 7,
  16. 'max_length' => 7,
  17. 'decimals' => 0,
  18. // 'underflow' => -1,
  19. 'nullable' => false,
  20. 'test_value' => 123456, ),
  21. 'NAME' => array( 'generic_type' => 'TEXT',
  22. 'sql_type' => array( 'VARCHAR2', 'VARCHAR' ),
  23. 'min_length' => 50,
  24. 'max_length' => 50,
  25. 'nullable' => false,
  26. 'test_value' => "Bolgoxed", ),
  27. 'CONTACT_PERSON' => array( 'generic_type' => 'TEXT',
  28. 'sql_type' => array( 'VARCHAR2', 'VARCHAR' ),
  29. 'min_length' => 50,
  30. 'max_length' => 50,
  31. 'nullable' => true,
  32. 'test_value' => "Henrietta Bloggs", ),
  33. 'PHONE' => array( 'generic_type' => 'TEXT',
  34. 'sql_type' => array( 'VARCHAR2', 'CHAR', 'VARCHAR' ),
  35. 'min_length' => 11,
  36. 'max_length' => 20,
  37. 'nullable' => false,
  38. 'legal_values' => array( "034511010", "2718391780", "+2496391734", "92819209365" ),
  39. 'test_value' => "646139981234", ),
  40. 'ADDRESS' => array( 'generic_type' => 'TEXT',
  41. 'sql_type' => array( 'VARCHAR2', 'VARCHAR' ),
  42. 'min_length' => 200,
  43. 'max_length' => 200,
  44. 'nullable' => false,
  45. 'test_value' => "12 Western Way", ),
  46. 'EMAIL' => array( 'generic_type' => 'TEXT',
  47. 'sql_type' => array( 'VARCHAR2', 'VARCHAR' ),
  48. 'min_length' => 50,
  49. 'max_length' => 50,
  50. 'nullable' => true,
  51. 'test_value' => "henrietta@bolgoxed.com", ),
  52. 'COMMENTS' => array( 'generic_type' => 'TEXT',
  53. 'sql_type' => array( 'VARCHAR2', 'CLOB' ),
  54. 'min_length' => 500,
  55. 'nullable' => true,
  56. 'test_value' => "Blah blah blah", ), );
  57. }
  58. public function getPKColumnList()
  59. {
  60. return array( 'SUPPLIER_ID' );
  61. }
  62. public function getFKColumnList()
  63. {
  64. return array();
  65. }
  66. public function getUniqueColumnList()
  67. {
  68. return array();
  69. }
  70. }
  71. ?>