summaryrefslogtreecommitdiffstats
path: root/tests/mocks/core/common.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-10-23 08:35:59 +0200
committerAndrey Andreev <narf@bofh.bg>2012-10-23 08:35:59 +0200
commitbf93f9397fbae4535fba661f561bf545c903ca8a (patch)
treebf74e17b593db9c242238598e79af979dd9556e5 /tests/mocks/core/common.php
parentf5f898f8f30968fb36413a14de2dc6a4599b79a6 (diff)
parent8889db7e1b1768ecfb76e9e73598541042a9edc1 (diff)
Merge pull request #1744 from dchill42/load_config_units
Loader and Config Unit Test Improvements
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;
}
}