Newer
Older
sqlmarker / UsedCars / Test_classes / Other / UsedCars_Test_Other.php
  1. <?php
  2. require_once "Schema.php";
  3.  
  4. abstract class UsedCars_Test_Other extends PHPUnit_Extensions_Database_TestCase_CreateTable
  5. {
  6. public function getTableName()
  7. {
  8. return 'OTHER';
  9. }
  10. public function getColumnList()
  11. {
  12. return array(
  13. // No need to test legal values because of the FK. If the FK is missing it's broken anyway!
  14. 'STAFF_ID' => array( 'generic_type' => 'NUMBER',
  15. 'sql_type' => array( 'NUMBER', 'INTEGER' ),
  16. 'min_length' => 4,
  17. 'max_length' => 4,
  18. 'decimals' => 0,
  19. 'nullable' => false,
  20. 'aliases' => array( 'OTHER_ID', 'OTHER_STAFF_ID' ),
  21. 'test_value' => '4571', ), // Has to be an unused Person_ID in the fixture because of the FK.
  22. 'SALARY' => array( 'generic_type' => 'NUMBER',
  23. 'sql_type' => array( 'NUMBER', 'DECIMAL' ),
  24. 'min_length' => 8,
  25. 'max_length' => 8,
  26. 'decimals' => 2,
  27. 'nullable' => false,
  28. 'underflow' => 28079.99,
  29. 'legal_values' => array( 28080, 999999.99 ),
  30. 'illegal_values'=> array( -10, 10000 ),
  31. 'test_value' => '45000', ),
  32. );
  33. }
  34. public function getPKColumnList()
  35. {
  36. return array( 'STAFF_ID' );
  37. }
  38. public function getFKColumnList()
  39. {
  40. return array(
  41. 'STAFF' => array( 'STAFF_ID' ),
  42. );
  43. }
  44. public function getUniqueColumnList()
  45. {
  46. return array();
  47. }
  48. }
  49. ?>