summaryrefslogtreecommitdiffstats
path: root/tests/mocks/database/schema
diff options
context:
space:
mode:
authorTimothy Warren <tim@timshomepage.net>2012-05-16 14:48:13 +0200
committerTimothy Warren <tim@timshomepage.net>2012-05-16 14:48:13 +0200
commit351c2e1b0d3fdca80a5483d708d7c71084226e68 (patch)
tree749c6accebdf6da1c301f9c2ee76c78bfe15954e /tests/mocks/database/schema
parent2ed226bd5ed19754c2fb28d4b98ac5423741f039 (diff)
parent8279420f989a8cda4427c3983ee919c6a1073dd7 (diff)
Merge branch 'develop' of git://github.com/EllisLab/CodeIgniter into errors
Diffstat (limited to 'tests/mocks/database/schema')
-rw-r--r--tests/mocks/database/schema/skeleton.php28
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'),