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.php26
1 files changed, 25 insertions, 1 deletions
diff --git a/tests/mocks/core/common.php b/tests/mocks/core/common.php
index a655ee1db..b001074c8 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'))
@@ -166,4 +190,4 @@ if ( ! function_exists('set_status_header'))
{
return TRUE;
}
-} \ No newline at end of file
+}