buildCache(); $this->assertFileExists($GLOBALS['sugar_config']['cache_dir'].'modules/unified_search_modules.php', 'Here should be cache file with data'); include $GLOBALS['sugar_config']['cache_dir'].'modules/unified_search_modules.php'; $force_unifiedsearch = 0; foreach ($unified_search_modules as $moduleName=>$moduleInformation) { foreach ($moduleInformation['fields'] as $fieldName=>$fieldInformation) { if (key_exists('force_unifiedsearch', $fieldInformation)) { $force_unifiedsearch++; } } } $this->assertGreaterThan(0, $force_unifiedsearch, 'Here should be fields with force_unifiedsearch key'); } }