diff options
author | Phil Sturgeon <email@philsturgeon.co.uk> | 2012-05-17 15:54:35 +0200 |
---|---|---|
committer | Phil Sturgeon <email@philsturgeon.co.uk> | 2012-05-17 15:54:35 +0200 |
commit | 76c5185c6ed8c44cb0f249afd72677627d54ff3c (patch) | |
tree | db10cc2cc30f731ac8625117f08ad8855efdf816 /tests/mocks/database | |
parent | 714252bf88306839484579059e3a447dd93d55c1 (diff) | |
parent | e30b3f7afafa2c016cf78cc8bb8a457c2dbcda8c (diff) |
Merge branch 'develop' of github.com:EllisLab/CodeIgniter into develop
Diffstat (limited to 'tests/mocks/database')
-rwxr-xr-x | tests/mocks/database/ci_test.sqlite | bin | 17408 -> 19456 bytes | |||
-rw-r--r-- | tests/mocks/database/schema/skeleton.php | 28 |
2 files changed, 28 insertions, 0 deletions
diff --git a/tests/mocks/database/ci_test.sqlite b/tests/mocks/database/ci_test.sqlite Binary files differindex 86d868af2..23a3de2a4 100755 --- a/tests/mocks/database/ci_test.sqlite +++ b/tests/mocks/database/ci_test.sqlite 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'), |