summaryrefslogtreecommitdiffstats
path: root/tests/mocks/database
diff options
context:
space:
mode:
Diffstat (limited to 'tests/mocks/database')
-rw-r--r--tests/mocks/database/config/mysql.php10
-rw-r--r--tests/mocks/database/config/mysqli.php10
-rw-r--r--tests/mocks/database/config/pdo/mysql.php14
-rw-r--r--tests/mocks/database/config/pdo/pgsql.php4
-rw-r--r--tests/mocks/database/config/pgsql.php4
-rw-r--r--tests/mocks/database/schema/skeleton.php10
6 files changed, 26 insertions, 26 deletions
diff --git a/tests/mocks/database/config/mysql.php b/tests/mocks/database/config/mysql.php
index a590b9f53..ca30cb9ca 100644
--- a/tests/mocks/database/config/mysql.php
+++ b/tests/mocks/database/config/mysql.php
@@ -5,9 +5,9 @@ return array(
// Typical Database configuration
'mysql' => array(
'dsn' => '',
- 'hostname' => 'localhost',
+ 'hostname' => '127.0.0.1',
'username' => 'travis',
- 'password' => '',
+ 'password' => 'travis',
'database' => 'ci_test',
'dbdriver' => 'mysql'
),
@@ -15,7 +15,7 @@ return array(
// Database configuration with failover
'mysql_failover' => array(
'dsn' => '',
- 'hostname' => 'localhost',
+ 'hostname' => '127.0.0.1',
'username' => 'not_travis',
'password' => 'wrong password',
'database' => 'not_ci_test',
@@ -23,9 +23,9 @@ return array(
'failover' => array(
array(
'dsn' => '',
- 'hostname' => 'localhost',
+ 'hostname' => '127.0.0.1',
'username' => 'travis',
- 'password' => '',
+ 'password' => 'travis',
'database' => 'ci_test',
'dbdriver' => 'mysql',
)
diff --git a/tests/mocks/database/config/mysqli.php b/tests/mocks/database/config/mysqli.php
index 5dd08abb2..fd8fec962 100644
--- a/tests/mocks/database/config/mysqli.php
+++ b/tests/mocks/database/config/mysqli.php
@@ -5,9 +5,9 @@ return array(
// Typical Database configuration
'mysqli' => array(
'dsn' => '',
- 'hostname' => 'localhost',
+ 'hostname' => '127.0.0.1',
'username' => 'travis',
- 'password' => '',
+ 'password' => 'travis',
'database' => 'ci_test',
'dbdriver' => 'mysqli'
),
@@ -15,7 +15,7 @@ return array(
// Database configuration with failover
'mysqli_failover' => array(
'dsn' => '',
- 'hostname' => 'localhost',
+ 'hostname' => '127.0.0.1',
'username' => 'not_travis',
'password' => 'wrong password',
'database' => 'not_ci_test',
@@ -23,9 +23,9 @@ return array(
'failover' => array(
array(
'dsn' => '',
- 'hostname' => 'localhost',
+ 'hostname' => '127.0.0.1',
'username' => 'travis',
- 'password' => '',
+ 'password' => 'travis',
'database' => 'ci_test',
'dbdriver' => 'mysqli',
)
diff --git a/tests/mocks/database/config/pdo/mysql.php b/tests/mocks/database/config/pdo/mysql.php
index 96608f787..89e9fb130 100644
--- a/tests/mocks/database/config/pdo/mysql.php
+++ b/tests/mocks/database/config/pdo/mysql.php
@@ -4,10 +4,10 @@ return array(
// Typical Database configuration
'pdo/mysql' => array(
- 'dsn' => 'mysql:host=localhost;dbname=ci_test',
- 'hostname' => 'localhost',
+ 'dsn' => 'mysql:host=127.0.0.1;dbname=ci_test',
+ 'hostname' => '127.0.0.1',
'username' => 'travis',
- 'password' => '',
+ 'password' => 'travis',
'database' => 'ci_test',
'dbdriver' => 'pdo',
'subdriver' => 'mysql'
@@ -16,7 +16,7 @@ return array(
// Database configuration with failover
'pdo/mysql_failover' => array(
'dsn' => '',
- 'hostname' => 'localhost',
+ 'hostname' => '127.0.0.1',
'username' => 'not_travis',
'password' => 'wrong password',
'database' => 'not_ci_test',
@@ -24,10 +24,10 @@ return array(
'subdriver' => 'mysql',
'failover' => array(
array(
- 'dsn' => 'mysql:host=localhost;dbname=ci_test',
- 'hostname' => 'localhost',
+ 'dsn' => 'mysql:host=127.0.0.1;dbname=ci_test',
+ 'hostname' => '127.0.0.1',
'username' => 'travis',
- 'password' => '',
+ 'password' => 'travis',
'database' => 'ci_test',
'dbdriver' => 'pdo',
'subdriver' => 'mysql'
diff --git a/tests/mocks/database/config/pdo/pgsql.php b/tests/mocks/database/config/pdo/pgsql.php
index e55e3ea77..846c70be9 100644
--- a/tests/mocks/database/config/pdo/pgsql.php
+++ b/tests/mocks/database/config/pdo/pgsql.php
@@ -7,7 +7,7 @@ return array(
'dsn' => 'pgsql:host=localhost;port=5432;dbname=ci_test;',
'hostname' => 'localhost',
'username' => 'postgres',
- 'password' => '',
+ 'password' => 'postgres',
'database' => 'ci_test',
'dbdriver' => 'pdo',
'subdriver' => 'pgsql'
@@ -27,7 +27,7 @@ return array(
'dsn' => 'pgsql:host=localhost;port=5432;dbname=ci_test;',
'hostname' => 'localhost',
'username' => 'postgres',
- 'password' => '',
+ 'password' => 'postgres',
'database' => 'ci_test',
'dbdriver' => 'pdo',
'subdriver' => 'pgsql'
diff --git a/tests/mocks/database/config/pgsql.php b/tests/mocks/database/config/pgsql.php
index 1444b0066..ce4583728 100644
--- a/tests/mocks/database/config/pgsql.php
+++ b/tests/mocks/database/config/pgsql.php
@@ -7,7 +7,7 @@ return array(
'dsn' => '',
'hostname' => 'localhost',
'username' => 'postgres',
- 'password' => '',
+ 'password' => 'postgres',
'database' => 'ci_test',
'dbdriver' => 'postgre'
),
@@ -25,7 +25,7 @@ return array(
'dsn' => '',
'hostname' => 'localhost',
'username' => 'postgres',
- 'password' => '',
+ 'password' => 'postgres',
'database' => 'ci_test',
'dbdriver' => 'postgre',
)
diff --git a/tests/mocks/database/schema/skeleton.php b/tests/mocks/database/schema/skeleton.php
index 888236ff3..e2b6e7d0e 100644
--- a/tests/mocks/database/schema/skeleton.php
+++ b/tests/mocks/database/schema/skeleton.php
@@ -76,7 +76,7 @@ class Mock_Database_Schema_Skeleton {
)
));
self::$forge->add_key('id', TRUE);
- self::$forge->create_table('user', TRUE);
+ self::$forge->create_table('user', TRUE) OR show_error('Unable to create the `user` table');
// Job Table
self::$forge->add_field(array(
@@ -93,7 +93,7 @@ class Mock_Database_Schema_Skeleton {
)
));
self::$forge->add_key('id', TRUE);
- self::$forge->create_table('job', TRUE);
+ self::$forge->create_table('job', TRUE) OR show_error('Unable to create the `job` table');
// Misc Table
self::$forge->add_field(array(
@@ -110,7 +110,7 @@ class Mock_Database_Schema_Skeleton {
)
));
self::$forge->add_key('id', TRUE);
- self::$forge->create_table('misc', TRUE);
+ self::$forge->create_table('misc', TRUE) OR show_error('Unable to create the `misc` table');
}
/**
@@ -143,11 +143,11 @@ class Mock_Database_Schema_Skeleton {
foreach ($data as $table => $dummy_data)
{
- self::$db->truncate($table);
+ self::$db->truncate($table) OR show_error("Unable to truncate `{$table}` table");
foreach ($dummy_data as $single_dummy_data)
{
- self::$db->insert($table, $single_dummy_data);
+ self::$db->insert($table, $single_dummy_data) OR show_error("Unable to insert data into `{$table}` table");
}
}
}