summaryrefslogtreecommitdiffstats
path: root/tests/mocks/database/schema/skeleton.php
diff options
context:
space:
mode:
authorPhil Sturgeon <email@philsturgeon.co.uk>2012-06-15 00:02:16 +0200
committerPhil Sturgeon <email@philsturgeon.co.uk>2012-06-15 00:02:16 +0200
commitc9bb0c5b7a3a349a5c255b02b5cc7ddbe32132e5 (patch)
tree905ff3f3153720c1d1547092e54feaf0e46568a6 /tests/mocks/database/schema/skeleton.php
parent3061ee737ff2c1853428482e1704b0973b621118 (diff)
parentf11a1939c25de1e327c7c02001c8fbd1ec1fc7b4 (diff)
Merge branch 'develop' of github.com:EllisLab/CodeIgniter into develop
Diffstat (limited to 'tests/mocks/database/schema/skeleton.php')
-rw-r--r--tests/mocks/database/schema/skeleton.php48
1 files changed, 24 insertions, 24 deletions
diff --git a/tests/mocks/database/schema/skeleton.php b/tests/mocks/database/schema/skeleton.php
index 05499f82f..18e1ddd4d 100644
--- a/tests/mocks/database/schema/skeleton.php
+++ b/tests/mocks/database/schema/skeleton.php
@@ -41,8 +41,7 @@ class Mock_Database_Schema_Skeleton {
return static::$db;
}
-
-
+
/**
* Create the dummy tables
*
@@ -54,20 +53,20 @@ class Mock_Database_Schema_Skeleton {
static::$forge->add_field(array(
'id' => array(
'type' => 'INTEGER',
- 'constraint' => 3,
+ 'constraint' => 3
),
'name' => array(
'type' => 'VARCHAR',
- 'constraint' => 40,
+ 'constraint' => 40
),
'email' => array(
'type' => 'VARCHAR',
- 'constraint' => 100,
+ 'constraint' => 100
),
'country' => array(
'type' => 'VARCHAR',
- 'constraint' => 40,
- ),
+ 'constraint' => 40
+ )
));
static::$forge->add_key('id', TRUE);
static::$forge->create_table('user', (strpos(static::$driver, 'pgsql') === FALSE));
@@ -76,15 +75,15 @@ class Mock_Database_Schema_Skeleton {
static::$forge->add_field(array(
'id' => array(
'type' => 'INTEGER',
- 'constraint' => 3,
+ 'constraint' => 3
),
'name' => array(
'type' => 'VARCHAR',
- 'constraint' => 40,
+ 'constraint' => 40
),
'description' => array(
- 'type' => 'TEXT',
- ),
+ 'type' => 'TEXT'
+ )
));
static::$forge->add_key('id', TRUE);
static::$forge->create_table('job', (strpos(static::$driver, 'pgsql') === FALSE));
@@ -93,15 +92,15 @@ class Mock_Database_Schema_Skeleton {
static::$forge->add_field(array(
'id' => array(
'type' => 'INTEGER',
- 'constraint' => 3,
+ 'constraint' => 3
),
'key' => array(
'type' => 'VARCHAR',
- 'constraint' => 40,
+ 'constraint' => 40
),
'value' => array(
- 'type' => 'TEXT',
- ),
+ 'type' => 'TEXT'
+ )
));
static::$forge->add_key('id', TRUE);
static::$forge->create_table('misc', (strpos(static::$driver, 'pgsql') === FALSE));
@@ -120,28 +119,29 @@ class Mock_Database_Schema_Skeleton {
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'),
+ 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' => 1, 'name' => 'Developer', 'description' => 'Awesome job, but sometimes makes you bored'),
array('id' => 2, 'name' => 'Politician', 'description' => 'This is not really a job'),
- array('id' => 3, 'name' => 'Accountant', 'description' => 'Boring job, but you will get free snack at lunch'),
- array('id' => 4, 'name' => 'Musician', 'description' => 'Only Coldplay can actually called Musician'),
+ array('id' => 3, 'name' => 'Accountant', 'description' => 'Boring job, but you will get free snack at lunch'),
+ array('id' => 4, 'name' => 'Musician', 'description' => 'Only Coldplay can actually called Musician')
),
'misc' => array(
- array('id' => 1, 'key' => '\\xxxfoo456', 'value' => 'Entry with \\xxx'),
- array('id' => 2, 'key' => '\\%foo456', 'value' => 'Entry with \\%'),
- ),
+ array('id' => 1, 'key' => '\\xxxfoo456', 'value' => 'Entry with \\xxx'),
+ array('id' => 2, 'key' => '\\%foo456', 'value' => 'Entry with \\%')
+ )
);
- foreach ($data as $table => $dummy_data)
+ foreach ($data as $table => $dummy_data)
{
static::$db->truncate($table);
foreach ($dummy_data as $single_dummy_data)
{
- static::$db->insert($table, $single_dummy_data);
+ static::$db->insert($table, $single_dummy_data);
}
}
}
+
} \ No newline at end of file