summaryrefslogtreecommitdiffstats
path: root/tests/mocks/database/schema/skeleton.php
diff options
context:
space:
mode:
authorTimothy Warren <tim@timshomepage.net>2012-05-16 21:39:14 +0200
committerTimothy Warren <tim@timshomepage.net>2012-05-16 21:39:14 +0200
commitf7f44584c7acb8be6097445529f09255bfe34e5d (patch)
treebb8760229e5113bca38d7505a475c1e6c62f2059 /tests/mocks/database/schema/skeleton.php
parentcb6c34eb5839d2b9c8d8ce70dcddde8931c0c277 (diff)
parentc59e8720177d96a1dec1b2cbcd6296bbfceb4a2b (diff)
Merge branch 'develop' of git://github.com/EllisLab/CodeIgniter into email
Diffstat (limited to 'tests/mocks/database/schema/skeleton.php')
-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'),