Newer
Older
sqlmarker / Unit_testing / BDL_Test_Sale_line.php
  1. <?php
  2. require_once "Schema.php";
  3.  
  4. abstract class BDL_Test_Sale_line extends PHPUnit_Extensions_Database_TestCase_CreateTable
  5. {
  6. public function getTableName()
  7. {
  8. return 'SALE_LINE';
  9. }
  10. public function getColumnList()
  11. {
  12. return array(
  13. 'SALE_NUM' => array( 'type' => array( 'NUMBER', 'INTEGER' ),
  14. 'min_length' => 10,
  15. 'max_length' => 10,
  16. 'decimals' => 0,
  17. 'nullable' => false,
  18. 'test_value' => "223", ),
  19. 'PRODUCT_CODE' => array( 'type' => array( 'NUMBER', 'INTEGER' ),
  20. 'min_length' => 8,
  21. 'max_length' => 8,
  22. 'decimals' => 0,
  23. 'nullable' => false,
  24. 'test_value' => "246", ),
  25. 'QUANTITY' => array( 'type' => array( 'NUMBER', 'INTEGER', 'SMALLINT' ),
  26. 'min_length' => 4,
  27. 'max_length' => 4,
  28. 'decimals' => 0,
  29. 'underflow' => 0,
  30. 'overflow' => 10000,
  31. 'nullable' => false,
  32. 'test_value' => "20", ),
  33. 'ACTUAL_PRICE' => array( 'type' => array( 'NUMBER', 'DECIMAL' ),
  34. 'min_length' => 7,
  35. 'max_length' => 7,
  36. 'decimals' => 2,
  37. 'underflow' => -0.01,
  38. 'overflow' => 100000.00,
  39. 'nullable' => false,
  40. 'test_value' => "24.99", ), );
  41. }
  42. public function getPKColumnList()
  43. {
  44. return array( 'SALE_NUM', 'PRODUCT_CODE' );
  45. }
  46. public function getFKColumnList()
  47. {
  48. return array(
  49. 'SALE_HEAD' => array( 'SALE_NUM' ),
  50. 'PRODUCT' => array( 'PRODUCT_CODE' ),
  51. );
  52. }
  53. }
  54. ?>