GitBucket
4.21.2
Toggle navigation
Snippets
Sign in
Files
Branches
1
Releases
Issues
Pull requests
Labels
Priorities
Milestones
Wiki
Forks
nigel.stanger
/
sqlmarker
Browse code
• Corrected underflow value for Date_Hired.
master
1 parent
69945b8
commit
2260df34313505dc67c3b168f8c9cb47c2d1d172
Nigel Stanger
authored
on 8 Apr 2014
Patch
Showing
1 changed file
UsedCars/Test_classes/Staff/UsedCars_Test_Staff.php
Ignore Space
Show notes
View
UsedCars/Test_classes/Staff/UsedCars_Test_Staff.php
<?php require_once "Schema.php"; abstract class UsedCars_Test_Staff extends PHPUnit_Extensions_Database_TestCase_CreateTable { public function getTableName() { return 'STAFF'; } public function getColumnList() { return array( 'STAFF_ID' => array( 'generic_type' => 'NUMBER', 'sql_type' => array( 'NUMBER', 'INTEGER', 'SMALLINT' ), 'min_length' => 4, 'max_length' => 4, 'decimals' => 0, 'nullable' => false, 'test_value' => '8462', ), 'FIRSTNAME' => array( 'generic_type' => 'TEXT', 'sql_type' => array( 'VARCHAR2', 'VARCHAR' ), 'min_length' => 50, 'max_length' => 50, 'nullable' => false, 'test_value' => 'Sarah', ), 'LASTNAME' => array( 'generic_type' => 'TEXT', 'sql_type' => array( 'VARCHAR2', 'VARCHAR' ), 'min_length' => 50, 'max_length' => 50, 'nullable' => false, 'test_value' => 'Smith', ), 'ADDRESS' => array( 'generic_type' => 'TEXT', 'sql_type' => array( 'VARCHAR2', 'VARCHAR' ), 'min_length' => 150, 'max_length' => 150, 'nullable' => false, 'test_value' => '123 George Street, Dunedin', ), 'PHONE' => array( 'generic_type' => 'TEXT', 'sql_type' => array( 'VARCHAR2', 'VARCHAR' ), 'min_length' => 11, 'nullable' => false, 'test_value' => '02144679437', ), 'DATE_HIRED' => array( 'generic_type' => 'DATE', 'sql_type' => array( 'DATE' ), 'nullable' => false, 'default' => 'SYSDATE', 'test_value' => "TO_DATE( '2012-03-28', 'YYYY-MM-DD' )" ), 'DATE_OF_BIRTH' => array( 'generic_type' => 'DATE', 'sql_type' => array( 'DATE' ), 'nullable' => false, 'underflow' => "SYSDATE - TO_YMINTERVAL( '18-0' ) + 1", 'test_value' => "TO_DATE( '2012-03-28', 'YYYY-MM-DD' )" ), ); } public function getPKColumnList() { return array( 'STAFF_ID' ); } public function getFKColumnList() { return array(); } public function getUniqueColumnList() { return array(); } } ?>
<?php require_once "Schema.php"; abstract class UsedCars_Test_Staff extends PHPUnit_Extensions_Database_TestCase_CreateTable { public function getTableName() { return 'STAFF'; } public function getColumnList() { return array( 'STAFF_ID' => array( 'generic_type' => 'NUMBER', 'sql_type' => array( 'NUMBER', 'INTEGER', 'SMALLINT' ), 'min_length' => 4, 'max_length' => 4, 'decimals' => 0, 'nullable' => false, 'test_value' => '8462', ), 'FIRSTNAME' => array( 'generic_type' => 'TEXT', 'sql_type' => array( 'VARCHAR2', 'VARCHAR' ), 'min_length' => 50, 'max_length' => 50, 'nullable' => false, 'test_value' => 'Sarah', ), 'LASTNAME' => array( 'generic_type' => 'TEXT', 'sql_type' => array( 'VARCHAR2', 'VARCHAR' ), 'min_length' => 50, 'max_length' => 50, 'nullable' => false, 'test_value' => 'Smith', ), 'ADDRESS' => array( 'generic_type' => 'TEXT', 'sql_type' => array( 'VARCHAR2', 'VARCHAR' ), 'min_length' => 150, 'max_length' => 150, 'nullable' => false, 'test_value' => '123 George Street, Dunedin', ), 'PHONE' => array( 'generic_type' => 'TEXT', 'sql_type' => array( 'VARCHAR2', 'VARCHAR' ), 'min_length' => 11, 'nullable' => false, 'test_value' => '02144679437', ), 'DATE_HIRED' => array( 'generic_type' => 'DATE', 'sql_type' => array( 'DATE' ), 'nullable' => false, 'default' => 'SYSDATE', 'test_value' => "TO_DATE( '2012-03-28', 'YYYY-MM-DD' )" ), 'DATE_OF_BIRTH' => array( 'generic_type' => 'DATE', 'sql_type' => array( 'DATE' ), 'nullable' => false, 'underflow' => "SYSDATE - TO_YMINTERVAL( '18-0' ) - 1", 'test_value' => "TO_DATE( '2012-03-28', 'YYYY-MM-DD' )" ), ); } public function getPKColumnList() { return array( 'STAFF_ID' ); } public function getFKColumnList() { return array(); } public function getUniqueColumnList() { return array(); } } ?>
Show line notes below