summaryrefslogtreecommitdiffstats
path: root/tests/mocks/core/common.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/mocks/core/common.php')
-rw-r--r--tests/mocks/core/common.php29
1 files changed, 27 insertions, 2 deletions
diff --git a/tests/mocks/core/common.php b/tests/mocks/core/common.php
index a655ee1db..9289b2716 100644
--- a/tests/mocks/core/common.php
+++ b/tests/mocks/core/common.php
@@ -39,6 +39,30 @@ if ( ! function_exists('config_item'))
}
}
+if ( ! function_exists('get_mimes'))
+{
+ /**
+ * Returns the MIME types array from config/mimes.php
+ *
+ * @return array
+ */
+ function &get_mimes()
+ {
+ static $_mimes = array();
+
+ if (empty($_mimes))
+ {
+ $path = realpath(PROJECT_BASE.'application/config/mimes.php');
+ if (is_file($path))
+ {
+ $_mimes = include($path);
+ }
+ }
+
+ return $_mimes;
+ }
+}
+
// --------------------------------------------------------------------
if ( ! function_exists('load_class'))
@@ -146,9 +170,10 @@ if ( ! function_exists('is_really_writable'))
if ( ! function_exists('is_loaded'))
{
- function is_loaded()
+ function &is_loaded()
{
- throw new Exception('Bad Isolation: mock up environment');
+ $loaded = array();
+ return $loaded;
}
}