diff options
author | Phil Sturgeon <email@philsturgeon.co.uk> | 2012-05-15 00:00:06 +0200 |
---|---|---|
committer | Phil Sturgeon <email@philsturgeon.co.uk> | 2012-05-15 00:00:06 +0200 |
commit | 212b0470e1aa288ba4f4d47d13647d6cd150fd15 (patch) | |
tree | f800288e4d064c8b9e1f1f1aa6f1a3c075918cb2 /tests/mocks/database/schema | |
parent | fff6c2a3caa1ce14e58fcb3ee0d937d17985eea1 (diff) | |
parent | 82196b945e291c65fdb66b35e3205f786ce8e921 (diff) |
Merge pull request #1324 from toopay/db-tests
Improved DB tests
Diffstat (limited to 'tests/mocks/database/schema')
-rw-r--r-- | tests/mocks/database/schema/skeleton.php | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/mocks/database/schema/skeleton.php b/tests/mocks/database/schema/skeleton.php index a3d5bac65..671336cc4 100644 --- a/tests/mocks/database/schema/skeleton.php +++ b/tests/mocks/database/schema/skeleton.php @@ -50,6 +50,28 @@ class Mock_Database_Schema_Skeleton { */ public static function create_tables() { + // User Table + static::$forge->add_field(array( + 'id' => array( + 'type' => 'INTEGER', + 'constraint' => 3, + ), + 'name' => array( + 'type' => 'VARCHAR', + 'constraint' => 40, + ), + 'email' => array( + 'type' => 'VARCHAR', + 'constraint' => 100, + ), + 'country' => array( + 'type' => 'VARCHAR', + 'constraint' => 40, + ), + )); + static::$forge->add_key('id', TRUE); + static::$forge->create_table('user', (strpos(static::$driver, 'pgsql') === FALSE)); + // Job Table static::$forge->add_field(array( 'id' => array( @@ -77,6 +99,12 @@ class Mock_Database_Schema_Skeleton { { // Job Data $data = array( + 'user' => array( + array('id' => 1, 'name' => 'Derek Jones', 'email' => 'derek@world.com', 'country' => 'US'), + array('id' => 2, 'name' => 'Ahmadinejad', 'email' => 'ahmadinejad@world.com', 'country' => 'Iran'), + array('id' => 3, 'name' => 'Richard A Causey', 'email' => 'richard@world.com', 'country' => 'US'), + array('id' => 4, 'name' => 'Chris Martin', 'email' => 'chris@world.com', 'country' => 'UK'), + ), 'job' => array( array('id' => 1, 'name' => 'Developer', 'description' => 'Awesome job, but sometimes makes you bored'), array('id' => 2, 'name' => 'Politician', 'description' => 'This is not really a job'), |