summaryrefslogtreecommitdiffstats
path: root/tests/mocks
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-05-25 00:02:43 +0200
committerAndrey Andreev <narf@bofh.bg>2012-05-25 00:02:43 +0200
commitb24a389ad4c12325c0dce9bbf7a04ceb056374d5 (patch)
tree3c5db13aa2ec1dbaf1c22ec1b7caa7ff05686e21 /tests/mocks
parent21cb2d32edd595a38189cdba137e694c3a22e1f0 (diff)
parent6a43244e1d739db17db266456221099232d120d6 (diff)
Merge pull request #1394 from toopay/db-test-suite
Escape like tests, #136 verification
Diffstat (limited to 'tests/mocks')
-rw-r--r--tests/mocks/database/schema/skeleton.php21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/mocks/database/schema/skeleton.php b/tests/mocks/database/schema/skeleton.php
index 671336cc4..05499f82f 100644
--- a/tests/mocks/database/schema/skeleton.php
+++ b/tests/mocks/database/schema/skeleton.php
@@ -88,6 +88,23 @@ class Mock_Database_Schema_Skeleton {
));
static::$forge->add_key('id', TRUE);
static::$forge->create_table('job', (strpos(static::$driver, 'pgsql') === FALSE));
+
+ // Misc Table
+ static::$forge->add_field(array(
+ 'id' => array(
+ 'type' => 'INTEGER',
+ 'constraint' => 3,
+ ),
+ 'key' => array(
+ 'type' => 'VARCHAR',
+ 'constraint' => 40,
+ ),
+ 'value' => array(
+ 'type' => 'TEXT',
+ ),
+ ));
+ static::$forge->add_key('id', TRUE);
+ static::$forge->create_table('misc', (strpos(static::$driver, 'pgsql') === FALSE));
}
/**
@@ -111,6 +128,10 @@ class Mock_Database_Schema_Skeleton {
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 \\%'),
+ ),
);
foreach ($data as $table => $dummy_data)