diff --git a/.gitignore b/.gitignore
index 34ccd197b5..844d3378f2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,17 +5,12 @@
/data/.backup/*
/data/config.php
/custom
-/application/Espo/Resources/metadata/scopes/CustomTest.json
-/application/Espo/Modules/Crm/Resources/metadata/scopes/CustomTest.json
-/application/Espo/Resources/layouts/CustomTest/*
-/application/Espo/Modules/Crm/Resources/layouts/CustomTest/*
-/application/Espo/Resources/metadata/customTest/*
-/application/Espo/Modules/Crm/Resources/metadata/customTest/*
/build
/node_modules
/client
/test.php
/main.html
/tests/testData/Utils/Config/config.php
+/tests/testData/*/cache/*
composer.phar
vendor/
diff --git a/application/Espo/Core/Utils/Config.php b/application/Espo/Core/Utils/Config.php
index 19270a24a0..09cde9ef46 100644
--- a/application/Espo/Core/Utils/Config.php
+++ b/application/Espo/Core/Utils/Config.php
@@ -150,7 +150,7 @@ class Config
$removeData = empty($this->removeData) ? null : $this->removeData;
- $result = $this->getFileManager()->mergeContentsPHP($this->configPath, $values, 1, $removeData);
+ $result = $this->getFileManager()->mergeContentsPHP($this->configPath, $values, $removeData);
if ($result) {
$this->changedData = array();
$this->removeData = array();
diff --git a/application/Espo/Core/Utils/Database/Orm/Converter.php b/application/Espo/Core/Utils/Database/Orm/Converter.php
index 083502015d..cbdc1a3bf1 100644
--- a/application/Espo/Core/Utils/Database/Orm/Converter.php
+++ b/application/Espo/Core/Utils/Database/Orm/Converter.php
@@ -164,8 +164,9 @@ class Converter
{
$entityDefs = $this->getEntityDefs();
+ $currentOrmMeta = $ormMeta;
//load custom field definitions and customCodes
- foreach($ormMeta as $entityName => &$entityParams) {
+ foreach($currentOrmMeta as $entityName => $entityParams) {
foreach($entityParams['fields'] as $fieldName => $fieldParams) {
//load custom field definitions
@@ -184,15 +185,15 @@ class Converter
}
$ormMeta = Util::merge($ormMeta, $fieldResult);
- } //END: load custom field definitions
+ } //END: load custom field definitions
//todo move to separate file
//add a field 'isFollowed' for scopes with 'stream => true'
$scopeDefs = $this->getMetadata()->get('scopes.'.$entityName);
if (isset($scopeDefs['stream']) && $scopeDefs['stream']) {
if (!isset($entityParams['fields']['isFollowed'])) {
- $entityParams['fields']['isFollowed'] = array(
+ $ormMeta[$entityName]['fields']['isFollowed'] = array(
'type' => 'varchar',
'notStorable' => true,
);
@@ -302,7 +303,7 @@ class Converter
{
/** set default type if exists */
if (!isset($fieldParams['type']) || empty($fieldParams['type'])) {
- $GLOBALS['log']->warning('Field type does not exist for '.$entityName.':'.$fieldName.'. Use default type ['.$this->defaultFieldType.']');
+ $GLOBALS['log']->debug('Field type does not exist for '.$entityName.':'.$fieldName.'. Use default type ['.$this->defaultFieldType.']');
$fieldParams['type'] = $this->defaultFieldType;
} /** END: set default type if exists */
diff --git a/application/Espo/Core/Utils/File/Manager.php b/application/Espo/Core/Utils/File/Manager.php
index f60a8aac3d..6d0c5734f1 100644
--- a/application/Espo/Core/Utils/File/Manager.php
+++ b/application/Espo/Core/Utils/File/Manager.php
@@ -225,13 +225,12 @@ class Manager
* @param string | array $path
* @param string $content JSON string
* @param bool $isJSON
- * @param string | array $mergeOptions
* @param string | array $removeOptions - List of unset keys from content
* @param bool $isReturn - Is result to be returned or stored
*
* @return bool | array
*/
- public function mergeContents($path, $content, $isJSON = false, $mergeOptions = null, $removeOptions = null, $isReturn = false)
+ public function mergeContents($path, $content, $isJSON = false, $removeOptions = null, $isReturn = false)
{
$fileContent = $this->getContents($path);
@@ -243,7 +242,7 @@ class Manager
$newDataArray = Utils\Util::unsetInArray($newDataArray, $removeOptions);
}
- $data = Utils\Util::merge($savedDataArray, $newDataArray, $mergeOptions);
+ $data = Utils\Util::merge($savedDataArray, $newDataArray);
if ($isJSON) {
$data = Utils\Json::encode($data, JSON_PRETTY_PRINT);
}
@@ -260,13 +259,12 @@ class Manager
*
* @param string | array $path
* @param string $content JSON string
- * @param string | array $mergeOptions
* @param string | array $removeOptions - List of unset keys from content
* @return bool
*/
- public function mergeContentsPHP($path, $content, $mergeOptions = null, $removeOptions = null)
+ public function mergeContentsPHP($path, $content, $removeOptions = null)
{
- $data = $this->mergeContents($path, $content, false, $mergeOptions, $removeOptions, true);
+ $data = $this->mergeContents($path, $content, false, $removeOptions, true);
return $this->putContentsPHP($path, $data);
}
diff --git a/application/Espo/Core/Utils/File/Unifier.php b/application/Espo/Core/Utils/File/Unifier.php
index c0b365eeee..355a3c215f 100644
--- a/application/Espo/Core/Utils/File/Unifier.php
+++ b/application/Espo/Core/Utils/File/Unifier.php
@@ -38,24 +38,21 @@ class Unifier
$this->fileManager = $fileManager;
}
-
protected function getFileManager()
{
return $this->fileManager;
}
-
/**
* Unite file content to the file
*
- * @param [type] $name [description]
- * @param [type] $paths [description]
+ * @param string $name
+ * @param array $paths
* @param boolean $recursively Note: only for first level of sub directory, other levels of sub directories will be ignored
- * @param [type] $mergeLevel - merge level, see Espo\Core\Utils\Util::merge()
*
* @return array
*/
- public function unify($name, $paths, $recursively = false, $mergeLevel = null, $mergeKeyName = null)
+ public function unify($name, $paths, $recursively = false)
{
$content = $this->unifySingle($paths['corePath'], $name, $recursively);
@@ -65,19 +62,17 @@ class Unifier
foreach ($dirList as $dirName) {
$curPath = str_replace('{*}', $dirName, $paths['modulePath']);
- $content = Utils\Util::merge($content, $this->unifySingle($curPath, $name, $recursively, $dirName), $mergeLevel, $mergeKeyName);
+ $content = Utils\Util::merge($content, $this->unifySingle($curPath, $name, $recursively, $dirName));
}
}
if (!empty($paths['customPath'])) {
- $content = Utils\Util::merge($content, $this->unifySingle($paths['customPath'], $name, $recursively), $mergeLevel, $mergeKeyName);
+ $content = Utils\Util::merge($content, $this->unifySingle($paths['customPath'], $name, $recursively));
}
return $content;
}
-
-
/**
* Unite file content to the file for one directory [NOW ONLY FOR METADATA, NEED TO CHECK FOR LAYOUTS AND OTHERS]
*
@@ -161,7 +156,7 @@ class Unifier
*
* @return array
*/
- protected function loadDefaultValues($name, $type='metadata')
+ protected function loadDefaultValues($name, $type = 'metadata')
{
$defaultPath = $this->params['defaultsPath'];
diff --git a/application/Espo/Core/Utils/Language.php b/application/Espo/Core/Utils/Language.php
index c5f6de1d19..abe599192b 100644
--- a/application/Espo/Core/Utils/Language.php
+++ b/application/Espo/Core/Utils/Language.php
@@ -241,7 +241,7 @@ class Language
$i18nCacheFile = str_replace('{*}', $i18nName, $this->cacheFile);
if ($i18nName != $this->defaultLanguage) {
- $i18nData = Util::merge($this->fullData[$this->defaultLanguage], $i18nData, null, null, true);
+ $i18nData = Util::merge($this->fullData[$this->defaultLanguage], $i18nData);
}
$result &= $this->getFileManager()->putContentsPHP($i18nCacheFile, $i18nData);
}
diff --git a/application/Espo/Core/Utils/Metadata.php b/application/Espo/Core/Utils/Metadata.php
index 9a55bf4a28..06acc37400 100644
--- a/application/Espo/Core/Utils/Metadata.php
+++ b/application/Espo/Core/Utils/Metadata.php
@@ -186,7 +186,7 @@ class Metadata
{
$data = false;
if (!file_exists($this->cacheFile) || $reload) {
- $data = $this->getUnifier()->unify($this->name, $this->paths, true, 5, 'options');
+ $data = $this->getUnifier()->unify($this->name, $this->paths, true);
if ($data === false) {
$GLOBALS['log']->emergency('Metadata:getMetadata() - metadata unite file cannot be created');
@@ -246,7 +246,7 @@ class Metadata
{
$path = $this->paths['customPath'];
- $result = $this->getFileManager()->mergeContents(array($path, $type, $scope.'.json'), $data, true, array(3, 'options'));
+ $result = $this->getFileManager()->mergeContents(array($path, $type, $scope.'.json'), $data, true);
if ($result === false) {
throw new Error("Error saving metadata. See log file for details.");
}
diff --git a/application/Espo/Core/Utils/System.php b/application/Espo/Core/Utils/System.php
index 012b022f36..dfc1d84dae 100644
--- a/application/Espo/Core/Utils/System.php
+++ b/application/Espo/Core/Utils/System.php
@@ -35,7 +35,7 @@ class System
preg_match('/^(.*?)\//i', $serverSoft, $match);
if (empty($match[1])) {
- preg_match('/^(.*?)\/?/i', $serverSoft, $match);
+ preg_match('/^(.*)\/?/i', $serverSoft, $match);
}
$serverName = strtolower( trim($match[1]) );
diff --git a/application/Espo/Core/Utils/Util.php b/application/Espo/Core/Utils/Util.php
index cd575e71ef..8d15417e4f 100644
--- a/application/Espo/Core/Utils/Util.php
+++ b/application/Espo/Core/Utils/Util.php
@@ -109,103 +109,47 @@ class Util
}
/**
- * Merge arrays (default PHP function is not suitable)
+ * Merge arrays recursively (default PHP function is not suitable)
*
- * @param array $array
- * @param array $mainArray - chief array (priority is same as for array_merge())
- * @param array $rewriteLevel - Merge by rewrite level, level numering starts from 1. Ex.
- * array(
- * 'level1' => array(
- * 'level2' => array(
- * 'level3' => array(
- * 'key1' => 'value',
- * 'key2' => 'value',
- * ),
- * ),
- * ),
- * )
- * @param $rewriteKeyName string - Rewrite key name. It is ignored if $rewriteLevel is NULL.
- * @param $rewriteArrays bool - Rewrite single arrays. Examples:
- * TRUE: array is [0, 1, 2], main array is [3, 4, 5], Result is [3, 4, 5].
- * FALSE: array is [0, 1, 2], main array is [3, 4, 5], Result is [0, 1, 2, 3, 4, 5].
+ * @param array $currentArray
+ * @param array $newArray - chief array (priority is same as for array_merge())
*
* @return array
*/
- public static function merge($array, $mainArray, $rewriteLevel = null, $rewriteKeyName = null, $rewriteArrays = false)
+ public static function merge($currentArray, $newArray)
{
- if (is_array($array) && !is_array($mainArray)) {
- return $array;
- } else if (!is_array($array) && is_array($mainArray)) {
- return $mainArray;
- } else if (!is_array($array) && !is_array($mainArray)) {
+ $mergeIdentifier = '__APPEND__';
+
+ if (is_array($currentArray) && (!is_array($newArray) || empty($newArray))) {
+ return $currentArray;
+ } else if ((!is_array($currentArray) || empty($currentArray)) && is_array($newArray)) {
+ return $newArray;
+ } else if ((!is_array($currentArray) || empty($currentArray)) && (!is_array($newArray) || empty($newArray))) {
return array();
}
- if (is_array($rewriteLevel)) {
- if (isset($rewriteLevel[1])) {
- $rewriteKeyName = $rewriteLevel[1];
- }
- if (isset($rewriteLevel[0])) {
- $rewriteLevel = $rewriteLevel[0];
- }
- }
+ /** add root items from currentArray */
+ foreach ($currentArray as $currentName => $currentValue) {
- foreach($mainArray as $mainKey => $mainValue) {
+ if (!isset($newArray[$currentName])) {
- $found = false;
- foreach($array as $key => $value) {
+ $newArray[$currentName] = $currentValue;
- if ((string)$mainKey == (string)$key) {
+ } else if (is_array($currentValue) && is_array($newArray[$currentName])) {
- $found = true;
- if (is_array($mainValue) || is_array($value)) {
-
- $rowRewriteLevel = $rewriteLevel;
-
- /** check the $rewriteKeyName */
- if (isset($rowRewriteLevel) && $rowRewriteLevel == 1 && isset($rewriteKeyName)) {
- $rewriteKeyName = is_array($rewriteKeyName) ? $rewriteKeyName : (array) $rewriteKeyName;
-
- if (!in_array((string)$key, $rewriteKeyName)) {
- $rowRewriteLevel = null;
- }
- } /** END: check the $rewriteKeyName */
-
- if (!isset($rowRewriteLevel) || $rowRewriteLevel != 1) {
- $array[$mainKey] = static::merge((array) $value, (array) $mainValue, --$rowRewriteLevel, $rewriteKeyName, $rewriteArrays);
- continue;
- }
-
- $mergeValue = array('mergeLevel' => (array) $value);
- $mergeMainValue = array('mergeLevel' => (array) $mainValue);
- $mergeRes = array_merge($mergeValue, $mergeMainValue);
- $array[$mainKey] = $mergeRes['mergeLevel'];
- continue;
- }
-
- /** merge logic */
- if (!is_numeric($mainKey)) {
- $array[$mainKey] = $mainValue;
- }
- elseif (!in_array($mainValue, $array)) {
- if ($rewriteArrays) {
- $array[$mainKey] = $mainValue;
- } else {
- $array[] = $mainValue;
- }
- } /** END: merge logic */
-
- break;
+ /** check __APPEND__ identifier */
+ $appendKey = array_search($mergeIdentifier, $newArray[$currentName], true);
+ if ($appendKey !== false) {
+ unset($newArray[$currentName][$appendKey]);
+ $newArray[$currentName] = array_merge($currentValue, $newArray[$currentName]);
+ } else {
+ $newArray[$currentName] = static::merge($currentValue, $newArray[$currentName]);
}
- }
- /** add an item if key not found */
- if (!$found) {
- $array[$mainKey] = $mainValue;
- }
+ }
}
- return $array;
+ return $newArray;
}
/**
@@ -239,7 +183,6 @@ class Util
return $folderPath . static::getSeparator() . $filePath;
}
-
/**
* Convert array to object format recursively
*
@@ -255,7 +198,6 @@ class Util
}
}
-
/**
* Convert object to array format recursively
*
@@ -285,7 +227,6 @@ class Util
return $name;
}
-
/**
* Get Naming according to prefix or postfix type
*
@@ -306,7 +247,6 @@ class Util
return null;
}
-
/**
* Replace $search in array recursively
*
@@ -390,7 +330,6 @@ class Util
return $content;
}
-
/**
* Get class name from the file path
*
@@ -407,7 +346,6 @@ class Util
return $className;
}
-
/**
* Return values of defined $key.
*
@@ -446,15 +384,33 @@ class Util
public static function isEquals($var1, $var2)
{
if (is_array($var1)) {
- ksort($var1);
+ static::ksortRecursive($var1);
}
if (is_array($var2)) {
- ksort($var2);
+ static::ksortRecursive($var2);
}
return ($var1 === $var2);
}
+ /**
+ * Sort array recursively
+ * @param array $array
+ * @return bool
+ */
+ public static function ksortRecursive(&$array)
+ {
+ if (!is_array($array)) {
+ return false;
+ }
+
+ ksort($array);
+ foreach ($array as $key => $value) {
+ static::ksortRecursive($array[$key]);
+ }
+
+ return true;
+ }
}
diff --git a/install/core/i18n/en_US/install.json b/install/core/i18n/en_US/install.json
index 5e9553e5b6..fc9661efd6 100644
--- a/install/core/i18n/en_US/install.json
+++ b/install/core/i18n/en_US/install.json
@@ -13,7 +13,11 @@
"Errors page title": "Errors",
"Finish page title": "Installation is complete",
"Congratulation! Welcome to EspoCRM": "Congratulation! EspoCRM has been successfully installed.",
- "More Information": "For more information,
please visit our blog: {BLOG}
follow us on twitter: {TWITTER}
If you have any suggestions or questions, please ask on the forum:
{FORUM}",
+ "More Information": "For more information, please visit our {BLOG}, follow us on {TWITTER}.
If you have any suggestions or questions, please ask on the {FORUM}.",
+ "share": "If you like EspoCRM, share it with your friends. Let them know about this great product.",
+ "blog": "blog",
+ "twitter": "twitter",
+ "forum": "forum",
"Installation Guide": "Installation Guide",
"admin": "admin",
"localhost": "localhost",
diff --git a/install/core/tpl/finish.tpl b/install/core/tpl/finish.tpl
index 2c7b3d2625..b0e25d6226 100644
--- a/install/core/tpl/finish.tpl
+++ b/install/core/tpl/finish.tpl
@@ -7,10 +7,22 @@
{$langs['labels']['Congratulation! Welcome to EspoCRM']}
+
+
+
+ {$langs['labels']['share']} +
+';
- //echo $response;
-
- if($resultStatus['http_code'] == 200) {
- if ($output) {
- echo "\r\n".$response."\r\n\r\n";
- }
- } else {
- if ($output) {
- echo 'CALL FAILED: '.print_r($resultStatus, true).'
'.$response;
- }
- }
-
- return array('response'=>$response, 'code'=>$resultStatus['http_code']);
- }
-
- function isSuccess($jsonData='', $output=false)
- {
- $response= $this->getResponse($jsonData, $output);
-
- return ($response['code'] == 200) ? true : false;
- }
-
-}
-
-?>
\ No newline at end of file
diff --git a/tests/Api/config.php b/tests/Api/config.php
deleted file mode 100644
index 1792cddb78..0000000000
--- a/tests/Api/config.php
+++ /dev/null
@@ -1,10 +0,0 @@
- false,
- 'apiUrl' => 'http://172.20.0.1/taras/espo/api/v1',
- 'username' => 'admin',
- 'password' => '1',
-);
-
-?>
\ No newline at end of file
diff --git a/tests/Espo/Core/Upgrades/BaseTest.php b/tests/Espo/Core/Upgrades/BaseTest.php
index d2b2888249..b8eec5f4da 100644
--- a/tests/Espo/Core/Upgrades/BaseTest.php
+++ b/tests/Espo/Core/Upgrades/BaseTest.php
@@ -80,7 +80,6 @@ class BaseTest extends \PHPUnit_Framework_TestCase
$this->assertEquals( $upgradeId, $this->reflection->invokeMethod('getUpgradeId', array()) );
}
-
public function testCreateUpgradeId()
{
$upgradeId = $this->reflection->setProperty('upgradeId', null);
@@ -97,7 +96,6 @@ class BaseTest extends \PHPUnit_Framework_TestCase
$this->reflection->invokeMethod('getUpgradeId', array());
}
-
public function testGetManifestIncorrect()
{
$this->setExpectedException('\Espo\Core\Exceptions\Error');
@@ -114,7 +112,6 @@ class BaseTest extends \PHPUnit_Framework_TestCase
$this->reflection->invokeMethod('getManifest', array());
}
-
public function testGetManifest()
{
$manifest = '{
@@ -162,7 +159,6 @@ class BaseTest extends \PHPUnit_Framework_TestCase
);
}
-
/**
* @dataProvider acceptableDataFalse
*/
@@ -184,7 +180,6 @@ class BaseTest extends \PHPUnit_Framework_TestCase
);
}
-
public function testGetUpgradePath()
{
$upgradeId = $this->reflection->invokeMethod('getUpgradeId', array());
@@ -195,12 +190,6 @@ class BaseTest extends \PHPUnit_Framework_TestCase
$postfix = $this->reflection->getProperty('packagePostfix');
$this->assertEquals( $upgradePath.$postfix, $this->reflection->invokeMethod('getUpgradePath', array(true)) );
}
-
-
-
-
-
-
}
?>
diff --git a/tests/Espo/Core/Utils/ConfigTest.php b/tests/Espo/Core/Utils/ConfigTest.php
index 96dd5ee181..619a88c620 100644
--- a/tests/Espo/Core/Utils/ConfigTest.php
+++ b/tests/Espo/Core/Utils/ConfigTest.php
@@ -11,7 +11,7 @@ class ConfigTest extends \PHPUnit_Framework_TestCase
protected $objects;
- protected $configPath = 'tests/testData/Utils/Config/config.php';
+ protected $configPath = 'tests/testData/Utils/Config/cache/config.php';
protected $systemConfigPath = 'tests/testData/Utils/Config/systemConfig.php';
diff --git a/tests/Espo/Core/Utils/FieldManagerTest.php b/tests/Espo/Core/Utils/FieldManagerTest.php
index c5667a1564..2c978b6f1f 100644
--- a/tests/Espo/Core/Utils/FieldManagerTest.php
+++ b/tests/Espo/Core/Utils/FieldManagerTest.php
@@ -65,14 +65,14 @@ class FieldManagerTest extends \PHPUnit_Framework_TestCase
);
$this->objects['metadata']
- ->expects($this->exactly(3))
+ ->expects($this->exactly(6))
->method('get')
->will($this->returnValue($data));
$this->assertTrue($this->object->update('name', $data, 'Account'));
}
- public function testUpdateCustomField()
+ public function testUpdateCustomFieldIsNotChanged()
{
$data = array(
"type" => "varchar",
@@ -85,11 +85,39 @@ class FieldManagerTest extends \PHPUnit_Framework_TestCase
->method('get')
->will($this->returnValue($data));
+ $this->objects['metadata']
+ ->expects($this->never())
+ ->method('set')
+ ->will($this->returnValue(true));
+
+ $this->assertTrue($this->object->update('varName', $data, 'CustomEntity'));
+ }
+
+ public function testUpdateCustomField()
+ {
+ $data = array(
+ "type" => "varchar",
+ "maxLength" => "50",
+ "isCustom" => true,
+ );
+
+ $this->objects['metadata']
+ ->expects($this->exactly(6))
+ ->method('get')
+ ->will($this->returnValue($data));
+
$this->objects['metadata']
->expects($this->once())
->method('set')
->will($this->returnValue(true));
+ $data = array(
+ "type" => "varchar",
+ "maxLength" => "150",
+ "required" => true,
+ "isCustom" => true,
+ );
+
$this->assertTrue($this->object->update('varName', $data, 'CustomEntity'));
}
diff --git a/tests/Espo/Core/Utils/SystemTest.php b/tests/Espo/Core/Utils/SystemTest.php
index bbce6ee339..9bebc3334e 100644
--- a/tests/Espo/Core/Utils/SystemTest.php
+++ b/tests/Espo/Core/Utils/SystemTest.php
@@ -32,6 +32,9 @@ class SystemTest extends \PHPUnit_Framework_TestCase
$_SERVER['SERVER_SOFTWARE'] = 'Microsoft-IIS/8.0';
$this->assertEquals( 'microsoft-iis', $this->object->getServerType());
+
+ $_SERVER['SERVER_SOFTWARE'] = 'apache/2.4.10 (win32) openssl/1.0.1i php';
+ $this->assertEquals( 'apache', $this->object->getServerType());
}
diff --git a/tests/Espo/Core/Utils/UtilTest.php b/tests/Espo/Core/Utils/UtilTest.php
index 1e78ccc98f..885adfcb6b 100644
--- a/tests/Espo/Core/Utils/UtilTest.php
+++ b/tests/Espo/Core/Utils/UtilTest.php
@@ -4,23 +4,21 @@ namespace tests\Espo\Core\Utils;
use Espo\Core\Utils\Util;
-
class UtilTest extends \PHPUnit_Framework_TestCase
{
-
- function testGetSeparator()
+ public function testGetSeparator()
{
$this->assertEquals(DIRECTORY_SEPARATOR, Util::getSeparator());
}
- function testToCamelCase()
+ public function testToCamelCase()
{
$this->assertEquals('detail', Util::toCamelCase('detail'));
$this->assertEquals('detailView', Util::toCamelCase('detail-view'));
$this->assertEquals('myDetailView', Util::toCamelCase('my-detail-view'));
}
- function testFromCamelCase()
+ public function testFromCamelCase()
{
$this->assertEquals('detail', Util::fromCamelCase('detail'));
$this->assertEquals('detail-view', Util::fromCamelCase('detailView'));
@@ -61,7 +59,6 @@ class UtilTest extends \PHPUnit_Framework_TestCase
$this->assertEquals($result, Util::merge($array1, $array2Main));
-
$array1= array(
'datetime' =>
array (
@@ -114,436 +111,383 @@ class UtilTest extends \PHPUnit_Framework_TestCase
$this->assertEquals($result, Util::merge($array1, $array2Main));
}
- public function testMergeLevel1()
+ public function testMergeWithAppend()
{
- $basicArr = array(
- 'useCache' => 111,
- 'useCache1' => 111,
- 'sub' => array (
- 'subV' => '1111',
- 'subV1' => '1111',
- 'subO' => array(
- 'subOV' => '11111',
- 'subOV1' => '11111',
- 'subOT' => array(
- 'subOTT' => '11111',
- 'subOT1' => '11111',
- ),
- ),
- ),
- );
-
- $advArr = array(
- 'useCache' => 222,
- 'useCache2' => 222,
- 'sub' => array (
- 'subV' => '222222',
- 'subV2' => '222222',
- 'subO' => array(
- 'subOV' => '22222',
- 'subOV2' => '22222',
- 'subOT' => array(
- 'subOTT' => '22222',
- 'subOT2' => '22222',
- ),
- ),
- ),
- );
-
- $result = array (
- 'useCache' => 222,
- 'useCache1' => 111,
- 'useCache2' => 222,
- 'sub' => array (
- 'subV' => '222222',
- 'subV2' => '222222',
- 'subO' => array(
- 'subOV' => '22222',
- 'subOV2' => '22222',
- 'subOT' => array(
- 'subOTT' => '22222',
- 'subOT2' => '22222',
- ),
- ),
- ),
- );
-
- $this->assertEquals($result, Util::merge($basicArr, $advArr, 1));
- $this->assertEquals($result, Util::merge($basicArr, $advArr, array(1)));
- }
-
-
- public function testMergeLevel1WithMergeKeyName()
- {
- $basicArr = array(
- 'useCache' => 111,
- 'useCache1' => 111,
- 'sub' => array (
- 'subV' => '1111',
- 'subV1' => '1111',
- 'subO' => array(
- 'subOV' => '11111',
- 'subOV1' => '11111',
- 'subOT' => array(
- 'subOTT' => '11111',
- 'subOT1' => '11111',
- ),
- ),
- ),
- );
-
- $advArr = array(
- 'useCache' => 222,
- 'useCache2' => 222,
- 'sub' => array (
- 'subV' => '222222',
- 'subV2' => '222222',
- 'subO' => array(
- 'subOV' => '22222',
- 'subOV2' => '22222',
- 'subOT' => array(
- 'subOTT' => '22222',
- 'subOT2' => '22222',
- ),
- ),
- ),
- );
-
- $result = array (
- 'useCache' => 222,
- 'useCache1' => 111,
- 'sub' =>
- array (
- 'subV' => '222222',
- 'subV1' => '1111',
- 'subO' =>
- array (
- 'subOV' => '22222',
- 'subOV1' => '11111',
- 'subOT' =>
+ $currentArray = array(
+ 'entityDefs' =>
array (
- 'subOTT' => '22222',
- 'subOT1' => '11111',
- 'subOT2' => '22222',
- ),
- 'subOV2' => '22222',
- ),
- 'subV2' => '222222',
- ),
- 'useCache2' => 222,
- );
-
- $this->assertEquals($result, Util::merge($basicArr, $advArr, 1, 'useCache'));
- $this->assertEquals( $result, Util::merge($basicArr, $advArr, array(1, 'useCache')) );
-
- $result = array (
- 'useCache' => 222,
- 'useCache1' => 111,
- 'sub' =>
- array (
- 'subV' => '222222',
- 'subV2' => '222222',
- 'subO' => array(
- 'subOV' => '22222',
- 'subOV2' => '22222',
- 'subOT' => array(
- 'subOTT' => '22222',
- 'subOT2' => '22222',
- ),
- ),
- ),
- 'useCache2' => 222,
- );
-
- $this->assertEquals($result, Util::merge($basicArr, $advArr, 1, 'sub'));
- $this->assertEquals( $result, Util::merge($basicArr, $advArr, array(1, 'sub')) );
- }
-
- public function testMergeLevel2()
- {
- $basicArr = array(
- 'useCache' => 111,
- 'useCache1' => 111,
- 'sub' => array (
- 'subV' => '1111',
- 'subV1' => '1111',
- 'subO' => array(
- 'subOV' => '11111',
- 'subOV1' => '11111',
- 'subOT' => array(
- 'subOTT' => '11111',
- 'subOT1' => '11111',
+ 'Attachment' =>
+ array (
+ 'fields' =>
+ array (
+ 'name' =>
+ array (
+ 'type' => 'varchar',
+ 'required' => true,
),
- ),
- ),
- );
-
- $advArr = array(
- 'useCache' => 222,
- 'useCache2' => 222,
- 'sub' => array (
- 'subV' => '222222',
- 'subV2' => '222222',
- 'subO' => array(
- 'subOV' => '22222',
- 'subOV2' => '22222',
- 'subOT' => array(
- 'subOTT' => '22222',
- 'subOT2' => '22222',
+ 'type' =>
+ array (
+ 'type' => 'varchar',
+ 'maxLength' => 36,
),
+ 'size' =>
+ array (
+ 'type' => 'enum',
+ 'value' => ["v1", "v2", "v3"],
+ ),
+ 'sizeInt' =>
+ array (
+ 'type' => 'enum',
+ 'value' => [0, 1, 2],
+ ),
+ 'merged' =>
+ array (
+ 'type' => 'enum',
+ 'value' => ["v1", "v2", "v3"],
+ ),
+ 'mergedInt' =>
+ array (
+ 'type' => 'enum',
+ 'value' => [0, 1, 2],
+ ),
+ ),
+ ),
+ 'Contact' =>
+ array (
+ 'fields' =>
+ array (
+ 'name' =>
+ array (
+ 'type' => 'varchar',
+ 'required' => true,
+ ),
+ 'type' =>
+ array (
+ 'type' => 'varchar',
+ 'maxLength' => 36,
+ ),
+ 'size' =>
+ array (
+ 'type' => 'enum',
+ 'value' => ["v1", "v2", "v3"],
+ ),
+ 'merged' =>
+ array (
+ 'type' => 'enum',
+ 'value' => ["v1", "v2", "v3"],
+ ),
+ ),
),
),
- );
-
- $result = array (
- 'useCache' => 222,
- 'useCache1' => 111,
- 'sub' =>
- array (
- 'subV' => '222222',
- 'subV1' => '1111',
- 'subO' =>
+ 'MyCustom' =>
array (
- 'subOV' => '22222',
- 'subOV2' => '22222',
- 'subOT' =>
+ 'fields' =>
array (
- 'subOTT' => '22222',
- 'subOT2' => '22222',
+ 'name' =>
+ array (
+ 'type' => 'varchar',
+ 'required' => true,
+ ),
),
),
- 'subV2' => '222222',
- ),
- 'useCache2' => 222,
);
- $this->assertEquals($result, Util::merge($basicArr, $advArr, 2));
- $this->assertEquals($result, Util::merge($basicArr, $advArr, array(2)));
+ $newArray = array(
+ 'entityDefs' =>
+ array (
+ 'Attachment' =>
+ array (
+ 'fields' =>
+ array (
+ 'name' =>
+ array (
+ 'type' => 'varchar',
+ 'required' => false,
+ 'NEW' => 'NEWVAL',
+ ),
+ 'type' =>
+ array (
+ 'type' => 'NETYPE',
+ ),
+ 'size' =>
+ array (
+ 'type' => 'enum',
+ 'value' => ["B1", "B2", "B3"],
+ ),
+ 'sizeInt' =>
+ array (
+ 'type' => 'enum',
+ 'value' => [5, 8, 9],
+ ),
+ 'merged' =>
+ array (
+ 'type' => 'enum',
+ 'value' => ["__APPEND__", "B1", "B2", "B3"],
+ ),
+ 'mergedInt' =>
+ array (
+ 'type' => 'enum',
+ 'value' => ['__APPEND__', 5, 8, 9],
+ ),
+ ),
+ 'list' =>
+ array (
+ 'test' => 'Here',
+ ),
+ ),
+ 'Contact' =>
+ array (
+ 'fields' =>
+ array (
+ 'name' =>
+ array (
+ 'type' => 'varchar',
+ 'required' => false,
+ 'NEW' => 'NEWVAL',
+ ),
+ 'type' =>
+ array (
+ 'type' => 'NEW',
+ 'maxLength' => 1000000,
+ ),
+ 'size' =>
+ array (
+ 'type' => 'enum',
+ 'value' => ["B1", "B2", "B3"],
+ ),
+ 'merged' =>
+ array (
+ 'type' => 'enum',
+ 'value' => ["__APPEND__", "B1", "B2", "B3"],
+ ),
+ ),
+ ),
+ ),
+ );
+
+
+ $result = array (
+ 'entityDefs' =>
+ array (
+ 'Attachment' =>
+ array (
+ 'fields' =>
+ array (
+ 'name' =>
+ array (
+ 'type' => 'varchar',
+ 'required' => false,
+ 'NEW' => 'NEWVAL',
+ ),
+ 'type' =>
+ array (
+ 'type' => 'NETYPE',
+ 'maxLength' => 36,
+ ),
+ 'size' =>
+ array (
+ 'type' => 'enum',
+ 'value' =>
+ array (
+ 0 => 'B1',
+ 1 => 'B2',
+ 2 => 'B3',
+ ),
+ ),
+ 'sizeInt' =>
+ array (
+ 'type' => 'enum',
+ 'value' =>
+ array (
+ 0 => 5,
+ 1 => 8,
+ 2 => 9,
+ ),
+ ),
+ 'merged' =>
+ array (
+ 'type' => 'enum',
+ 'value' =>
+ array (
+ 0 => 'v1',
+ 1 => 'v2',
+ 2 => 'v3',
+ 3 => 'B1',
+ 4 => 'B2',
+ 5 => 'B3',
+ ),
+ ),
+ 'mergedInt' =>
+ array (
+ 'type' => 'enum',
+ 'value' =>
+ array (
+ 0 => 0,
+ 1 => 1,
+ 2 => 2,
+ 3 => 5,
+ 4 => 8,
+ 5 => 9,
+ ),
+ ),
+ ),
+ 'list' =>
+ array (
+ 'test' => 'Here',
+ ),
+ ),
+ 'Contact' =>
+ array (
+ 'fields' =>
+ array (
+ 'name' =>
+ array (
+ 'type' => 'varchar',
+ 'required' => false,
+ 'NEW' => 'NEWVAL',
+ ),
+ 'type' =>
+ array (
+ 'type' => 'NEW',
+ 'maxLength' => 1000000,
+ ),
+ 'size' =>
+ array (
+ 'type' => 'enum',
+ 'value' =>
+ array (
+ 0 => 'B1',
+ 1 => 'B2',
+ 2 => 'B3',
+ ),
+ ),
+ 'merged' =>
+ array (
+ 'type' => 'enum',
+ 'value' =>
+ array (
+ 0 => 'v1',
+ 1 => 'v2',
+ 2 => 'v3',
+ 3 => 'B1',
+ 4 => 'B2',
+ 5 => 'B3',
+ ),
+ ),
+ ),
+ ),
+ ),
+ 'MyCustom' =>
+ array (
+ 'fields' =>
+ array (
+ 'name' =>
+ array (
+ 'type' => 'varchar',
+ 'required' => true,
+ ),
+ ),
+ ),
+ );
+
+ $this->assertEquals($result, Util::merge($currentArray, $newArray));
}
- public function testMergeLevel2WithMergeKeyName()
+ public function testMergeWithBool()
{
- $basicArr = array(
- 'useCache' => 111,
- 'useCache1' => 111,
- 'sub' => array (
- 'subV' => '1111',
- 'subV1' => '1111',
- 'subO' => array(
- 'subOV' => '11111',
- 'subOV1' => '11111',
- 'subOT' => array(
- 'subOTT' => '11111',
- 'subOT1' => '11111',
- ),
- ),
+ $currentArray = array (
+ 'fields' =>
+ array (
+ 'accountId' =>
+ array (
+ 'type' => 'varchar',
+ 'where' =>
+ array (
+ '=' => 'contact.id IN ({value})',
+ ),
+ 'len' => 255,
),
+ 'deleted' =>
+ array (
+ 'type' => 'bool',
+ 'default' => false,
+ 'trueValue' => true,
+ ),
+ ),
+ 'relations' =>
+ array (
+ ),
);
- $advArr = array(
- 'useCache' => 222,
- 'useCache2' => 222,
- 'sub' => array (
- 'subV' => '222222',
- 'subV2' => '222222',
- 'subO' => array(
- 'subOV' => '22222',
- 'subOV2' => '22222',
- 'subOT' => array(
- 'subOTT' => '22222',
- 'subOT2' => '22222',
- ),
- ),
+ $newArray = array (
+ 'fields' =>
+ array (
+ 'accountName' =>
+ array (
+ 'type' => 'foreign',
+ 'relation' => 'account',
+ 'foreign' => 'name',
),
+ 'accountId' =>
+ array (
+ 'type' => 'foreignId',
+ 'index' => true,
+ ),
+ ),
+ 'relations' =>
+ array (
+ 'createdBy' =>
+ array (
+ 'type' => 'belongsTo',
+ 'entity' => 'User',
+ 'key' => 'createdById',
+ 'foreignKey' => 'id',
+ ),
+ ),
);
$result = array (
- 'useCache' => 222,
- 'useCache1' => 111,
- 'sub' =>
+ 'fields' =>
array (
- 'subV' => '222222',
- 'subV1' => '1111',
- 'subO' =>
- array (
- 'subOV' => '22222',
- 'subOV1' => '11111',
- 'subOT' =>
- array (
- 'subOTT' => '22222',
- 'subOT1' => '11111',
- 'subOT2' => '22222',
- ),
- 'subOV2' => '22222',
- ),
- 'subV2' => '222222',
+ 'accountName' =>
+ array (
+ 'type' => 'foreign',
+ 'relation' => 'account',
+ 'foreign' => 'name',
+ ),
+ 'accountId' =>
+ array (
+ 'type' => 'foreignId',
+ 'index' => true,
+ 'where' =>
+ array (
+ '=' => 'contact.id IN ({value})',
+ ),
+ 'len' => 255,
+ ),
+ 'deleted' =>
+ array (
+ 'type' => 'bool',
+ 'default' => false,
+ 'trueValue' => true,
+ ),
+ ),
+ 'relations' =>
+ array (
+ 'createdBy' =>
+ array (
+ 'type' => 'belongsTo',
+ 'entity' => 'User',
+ 'key' => 'createdById',
+ 'foreignKey' => 'id',
+ ),
),
- 'useCache2' => 222,
);
- $this->assertEquals($result, Util::merge($basicArr, $advArr, 2, 'subOV'));
- $this->assertEquals( $result, Util::merge($basicArr, $advArr, array(2, 'subOV')) );
-
- $result = array (
- 'useCache' => 222,
- 'useCache1' => 111,
- 'sub' =>
- array (
- 'subV' => '222222',
- 'subV1' => '1111',
- 'subO' =>
- array (
- 'subOV' => '22222',
- 'subOV2' => '22222',
- 'subOT' =>
- array (
- 'subOTT' => '22222',
- 'subOT2' => '22222',
- ),
- ),
- 'subV2' => '222222',
- ),
- 'useCache2' => 222,
- );
-
- $this->assertEquals($result, Util::merge($basicArr, $advArr, 2, 'subO'));
- $this->assertEquals( $result, Util::merge($basicArr, $advArr, array(2, 'subO')) );
+ $this->assertEquals($result, Util::merge($currentArray, $newArray));
}
-
- public function testMergeLevel3()
- {
- $basicArr = array(
- 'useCache' => 111,
- 'useCache1' => 111,
- 'sub' => array (
- 'subV' => '1111',
- 'subV1' => '1111',
- 'subO' => array(
- 'subOV' => '11111',
- 'subOV1' => '11111',
- 'subOT' => array(
- 'subOTT' => '11111',
- 'subOT1' => '11111',
- ),
- ),
- ),
- );
-
- $advArr = array(
- 'useCache' => 222,
- 'useCache2' => 222,
- 'sub' => array (
- 'subV' => '222222',
- 'subV2' => '222222',
- 'subO' => array(
- 'subOV' => '22222',
- 'subOV2' => '22222',
- 'subOT' => array(
- 'subOTT' => '22222',
- 'subOT2' => '22222',
- ),
- ),
- ),
- );
-
- $result = array (
- 'useCache' => 222,
- 'useCache1' => 111,
- 'sub' =>
- array (
- 'subV' => '222222',
- 'subV1' => '1111',
- 'subO' =>
- array (
- 'subOV' => '22222',
- 'subOV1' => '11111',
- 'subOT' =>
- array (
- 'subOTT' => '22222',
- 'subOT2' => '22222',
- ),
- 'subOV2' => '22222',
- ),
- 'subV2' => '222222',
- ),
- 'useCache2' => 222,
- );
-
- $this->assertEquals($result, Util::merge($basicArr, $advArr, 3));
- }
-
- public function testMergeLevel4Plus()
- {
- $basicArr = array(
- 'useCache' => 111,
- 'useCache1' => 111,
- 'sub' => array (
- 'subV' => '1111',
- 'subV1' => '1111',
- 'subO' => array(
- 'subOV' => '11111',
- 'subOV1' => '11111',
- 'subOT' => array(
- 'subOTT' => '11111',
- 'subOT1' => '11111',
- ),
- ),
- ),
- );
-
- $advArr = array(
- 'useCache' => 222,
- 'useCache2' => 222,
- 'sub' => array (
- 'subV' => '222222',
- 'subV2' => '222222',
- 'subO' => array(
- 'subOV' => '22222',
- 'subOV2' => '22222',
- 'subOT' => array(
- 'subOTT' => '22222',
- 'subOT2' => '22222',
- ),
- ),
- ),
- );
-
- $result = array (
- 'useCache' => 222,
- 'useCache1' => 111,
- 'sub' =>
- array (
- 'subV' => '222222',
- 'subV1' => '1111',
- 'subO' =>
- array (
- 'subOV' => '22222',
- 'subOV1' => '11111',
- 'subOT' =>
- array (
- 'subOTT' => '22222',
- 'subOT1' => '11111',
- 'subOT2' => '22222',
- ),
- 'subOV2' => '22222',
- ),
- 'subV2' => '222222',
- ),
- 'useCache2' => 222,
- );
-
- $this->assertEquals($result, Util::merge($basicArr, $advArr, 4));
-
- $this->assertEquals($result, Util::merge($basicArr, $advArr, 5));
-
- $this->assertEquals($result, Util::merge($basicArr, $advArr, 6));
-
- $this->assertEquals($result, Util::merge($basicArr, $advArr));
- }
-
-
- function testToFormat()
+ public function testToFormat()
{
$this->assertEquals('/Espo/Core/Utils', Util::toFormat('/Espo/Core/Utils', '/'));
$this->assertEquals('\Espo\Core\Utils', Util::toFormat('/Espo/Core/Utils', '\\'));
@@ -552,7 +496,7 @@ class UtilTest extends \PHPUnit_Framework_TestCase
$this->assertEquals('\Espo\Core\Utils', Util::toFormat('\Espo\Core\Utils', '\\'));
}
- function testConcatPath()
+ public function testConcatPath()
{
$result= 'dir1/dir2/file1.json';
$this->assertEquals($result, Util::concatPath('dir1/dir2', 'file1.json'));
@@ -573,7 +517,7 @@ class UtilTest extends \PHPUnit_Framework_TestCase
}
- function testArrayToObject()
+ public function testArrayToObject()
{
$testArr= array(
'useCache' => true,
@@ -599,7 +543,7 @@ class UtilTest extends \PHPUnit_Framework_TestCase
}
- function testObjectToArray()
+ public function testObjectToArray()
{
$testObj= (object) array(
'useCache' => true,
@@ -624,7 +568,7 @@ class UtilTest extends \PHPUnit_Framework_TestCase
$this->assertEquals($testResult, Util::objectToArray($testObj));
}
- function testGetNaming()
+ public function testGetNaming()
{
$this->assertEquals('myPrefixMyName', Util::getNaming('myName', 'myPrefix', 'prefix'));
@@ -633,7 +577,7 @@ class UtilTest extends \PHPUnit_Framework_TestCase
$this->assertEquals('myNameMyPostfix', Util::getNaming('my_name', 'my_postfix', 'postfix', '_'));
}
- function testReplaceInArray()
+ public function testReplaceInArray()
{
$testArray = array(
'option' => array(
@@ -657,7 +601,7 @@ class UtilTest extends \PHPUnit_Framework_TestCase
}
- function testGetClassName()
+ public function testGetClassName()
{
$this->assertEquals('\Espo\EntryPoints\Donwload', Util::getClassName('application/Espo/EntryPoints/Donwload.php'));
$this->assertEquals('\Espo\EntryPoints\Donwload', Util::getClassName('custom/Espo/EntryPoints/Donwload.php'));
@@ -665,7 +609,7 @@ class UtilTest extends \PHPUnit_Framework_TestCase
$this->assertEquals('\Espo\EntryPoints\Donwload', Util::getClassName('application/Espo/EntryPoints/Donwload'));
}
- function testUnsetInArrayNotSingle()
+ public function testUnsetInArrayNotSingle()
{
$input = array(
'Account' => array(
@@ -700,7 +644,7 @@ class UtilTest extends \PHPUnit_Framework_TestCase
$this->assertEquals($result, Util::unsetInArray($input, $unsets));
}
- function testUnsetInArraySingle()
+ public function testUnsetInArraySingle()
{
$input = array(
'Account' => array(
@@ -734,7 +678,7 @@ class UtilTest extends \PHPUnit_Framework_TestCase
}
- function testUnsetInArrayTogether()
+ public function testUnsetInArrayTogether()
{
$input = array(
'Account' => array(
@@ -771,7 +715,7 @@ class UtilTest extends \PHPUnit_Framework_TestCase
}
- function testUnsetInArray()
+ public function testUnsetInArray()
{
$input = array(
'Account' => array(
@@ -826,7 +770,7 @@ class UtilTest extends \PHPUnit_Framework_TestCase
$this->assertEquals($result, Util::unsetInArray($input, $unsets));
}
- function testGetValueByKey()
+ public function testGetValueByKey()
{
$inputArray = array(
'Account' => array(
@@ -858,41 +802,6 @@ class UtilTest extends \PHPUnit_Framework_TestCase
$this->assertEquals('customReturns', Util::getValueByKey($inputArray, 'Contact.notExists', 'customReturns'));
$this->assertNotEquals('customReturns', Util::getValueByKey($inputArray, 'Contact.useCache', 'customReturns'));
}
-
-
-
- /*function testGetScopeModuleName()
- {
- $this->assertEquals('Crm', $this->fixture->getScopeModuleName('Account'));
- $this->assertEquals('Crm', $this->fixture->getScopeModuleName('account'));
- $this->assertNotEquals('crm', $this->fixture->getScopeModuleName('account'));
-
- $this->assertEquals('', $this->fixture->getScopeModuleName('User'));
- $this->assertEquals('', $this->fixture->getScopeModuleName('user'));
- $this->assertNotEquals('Crm', $this->fixture->getScopeModuleName('User'));
- }
-
-
- function testGetScopePath()
- {
- $this->assertEquals('Modules/Crm', $this->fixture->getScopePath('Account', '/'));
- $this->assertEquals('Modules\Crm', $this->fixture->getScopePath('Account', '\\'));
- $this->assertEquals('Modules\Crm', $this->fixture->getScopePath('account', '\\'));
-
- $this->assertEquals('Espo', $this->fixture->getScopePath('User', '/'));
- $this->assertEquals('Espo', $this->fixture->getScopePath('User', '\\'));
- $this->assertEquals('Espo', $this->fixture->getScopePath('user', '\\'));
- }
-
-
- function testGetScopes()
- {
- $this->assertArrayHasKey('User', $this->fixture->getScopes() );
- } */
-
-
-
-
}
?>
\ No newline at end of file
diff --git a/tests/testData/Utils/Config/config.php b/tests/testData/Utils/Config/cache/config.php
similarity index 97%
rename from tests/testData/Utils/Config/config.php
rename to tests/testData/Utils/Config/cache/config.php
index bba9d3119b..846ec89553 100644
--- a/tests/testData/Utils/Config/config.php
+++ b/tests/testData/Utils/Config/cache/config.php
@@ -1,6 +1,10 @@
1412600573,
+ 'removeOption' => 'Test',
+ 'testOption' => 'Another Wrong Value',
+ 'testOption2' => 'Test2',
'database' =>
array (
'driver' => 'pdo_mysql',
@@ -102,9 +106,6 @@ return array (
8 => 'Prospect',
),
'isInstalled' => true,
- 'cacheTimestamp' => 1404901977,
- 'testOption' => 'Another Wrong Value',
- 'testOption2' => 'Test2',
);
?>
\ No newline at end of file