Newer
Older
sqlmarker / BDL / Test_classes / Assembly / BDL_Test_Assembly.php
  1. <?php
  2. require_once "Schema.php";
  3.  
  4. abstract class BDL_Test_Assembly extends PHPUnit_Extensions_Database_TestCase_CreateTable
  5. {
  6. public function getTableName()
  7. {
  8. return 'ASSEMBLY';
  9. }
  10. public function getColumnList()
  11. {
  12. return array(
  13. 'PRODUCT_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' => "237", ),
  20. 'COMPONENT_CODE' => array( 'generic_type' => 'NUMBER',
  21. 'sql_type' => array( 'NUMBER', 'INTEGER' ),
  22. 'min_length' => 8,
  23. 'max_length' => 8,
  24. 'decimals' => 0,
  25. 'nullable' => false,
  26. 'test_value' => "660", ),
  27. 'QUANTITY' => array( 'generic_type' => 'NUMBER',
  28. 'sql_type' => array( 'NUMBER', 'INTEGER', 'SMALLINT' ),
  29. 'min_length' => 4,
  30. 'max_length' => 5,
  31. 'decimals' => 0,
  32. 'underflow' => 0, // should be 1, but there was a typo in the spec
  33. 'overflow' => 10000,
  34. 'nullable' => false,
  35. 'test_value' => "456", ), );
  36. }
  37. public function getPKColumnList()
  38. {
  39. return array( 'PRODUCT_CODE', 'COMPONENT_CODE' );
  40. }
  41. public function getFKColumnList()
  42. {
  43. return array(
  44. 'PRODUCT' => array ( 'PRODUCT_CODE' ),
  45. 'COMPONENT' => array ( 'COMPONENT_CODE' ),
  46. );
  47. }
  48. public function getUniqueColumnList()
  49. {
  50. return array();
  51. }
  52. }
  53. ?>