diff --git a/phpunit.xml.dist b/phpunit.xml.dist
index f1982031..83dd156f 100644
--- a/phpunit.xml.dist
+++ b/phpunit.xml.dist
@@ -8,7 +8,6 @@
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
- syntaxCheck="false"
verbose="true"
bootstrap="../../../../tests/bootstrap.php">
@@ -17,7 +16,7 @@
./tests/functional
- ./tests/functional/
+ ./tests/functional/
diff --git a/tests/mock/user.php b/tests/mock/user.php
index b0ca4c45..423543bb 100644
--- a/tests/mock/user.php
+++ b/tests/mock/user.php
@@ -9,7 +9,7 @@
namespace board3\portal\tests\mock;
-class user extends \PHPUnit_Framework_TestCase
+class user extends \PHPUnit\Framework\TestCase
{
public $lang = array();
diff --git a/tests/unit/acp/move_module_test.php b/tests/unit/acp/move_module_test.php
index 04175b78..168c21ce 100644
--- a/tests/unit/acp/move_module_test.php
+++ b/tests/unit/acp/move_module_test.php
@@ -51,10 +51,12 @@ class phpbb_acp_move_module_test extends \board3\portal\tests\testframework\data
$phpbb_container = new \phpbb_mock_container_builder();
// Mock module service collection
$config = new \phpbb\config\config(array());
- $auth = $this->getMock('\phpbb\auth\auth', array('acl_get'));
+ $auth = $this->getMockBuilder('\phpbb\auth\auth')
+ ->setMethods(['acl_get'])
+ ->getMock();
$auth->expects($this->any())
->method('acl_get')
- ->with($this->anything())
+ ->withAnyParameters()
->will($this->returnValue(true));
$controller_helper = new \board3\portal\tests\mock\controller_helper($phpbb_root_path, $phpEx);
$controller_helper->add_route('board3_portal_controller', 'portal');
@@ -73,7 +75,9 @@ class phpbb_acp_move_module_test extends \board3\portal\tests\testframework\data
$phpbb_container->setParameter('board3.portal.config.table', $table_prefix . 'portal_config');
$this->portal_columns = new \board3\portal\portal\columns();
$phpbb_container->set('board3.portal.columns', $this->portal_columns);
- $cache = $this->getMock('\phpbb\cache\cache', array('destroy', 'sql_exists', 'get', 'put', 'sql_load', 'sql_save'));
+ $cache = $this->getMockBuilder('\phpbb\cache\cache')
+ ->setMethods(['destroy', 'sql_exists', 'get', 'put', 'sql_load', 'sql_save'])
+ ->getMock();
$cache->expects($this->any())
->method('destroy')
->with($this->equalTo('sql'));
@@ -102,7 +106,9 @@ class phpbb_acp_move_module_test extends \board3\portal\tests\testframework\data
));
$this->database_handler = new \board3\portal\portal\modules\database_handler($db);
$this->constraints_handler = new \board3\portal\portal\modules\constraints_handler($this->portal_columns, $user);
- $phpbb_dispatcher = $this->getMock('\phpbb\event\dispatcher', array('trigger_event'), array($phpbb_container));
+ $phpbb_dispatcher = $this->getMockBuilder('\phpbb\event\dispatcher')
+ ->setMethods(['trigger_event'])
+ ->getMock();
$phpbb_dispatcher->expects($this->any())
->method('trigger_event')
->with($this->anything())
diff --git a/tests/unit/controller/helper_test.php b/tests/unit/controller/helper_test.php
index 47a53675..90c42580 100644
--- a/tests/unit/controller/helper_test.php
+++ b/tests/unit/controller/helper_test.php
@@ -25,8 +25,12 @@ class helper_test extends \board3\portal\tests\testframework\test_case
parent::setUp();
- $cache = $this->getMock('\phpbb\cache\driver', array('get', 'put'));
- $this->auth = $this->getMock('\phpbb\auth\auth', array('acl_get'));
+ $cache = $this->getMockBuilder('\phpbb\cache\driver')
+ ->setMethods(['get', 'put'])
+ ->getMock();
+ $this->auth = $this->getMockBuilder('\phpbb\auth\auth')
+ ->setMethods(['acl_get'])
+ ->getMock();
$this->auth->expects($this->any())
->method('acl_get')
->with($this->anything())
@@ -143,7 +147,10 @@ class helper_test extends \board3\portal\tests\testframework\test_case
$this->assertNull($this->controller_helper->load_module_language($this->modules['\board3\portal\modules\link_us']));
$this->assertEquals('Link to us', $this->user->lang('LINK_US'));
$this->assertFalse(isset($this->user->lang['PORTAL_LEADERS_EXT']));
- $module = $this->getMock('\board3\portal\modules\link_us', array('get_language'), array($this->config, new \board3\portal\tests\mock\template($this), new \board3\portal\tests\mock\user));
+ $module = $this->getMockBuilder('\board3\portal\modules\link_us')
+ ->setMethods(['get_language'])
+ ->setConstructorArgs([$this->config, new \board3\portal\tests\mock\template($this), new \board3\portal\tests\mock\user])
+ ->getMock();
$module->expects($this->any())
->method('get_language')
->willReturn(array(
diff --git a/tests/unit/controller/main_test.php b/tests/unit/controller/main_test.php
index 552dce9e..ac799b37 100644
--- a/tests/unit/controller/main_test.php
+++ b/tests/unit/controller/main_test.php
@@ -54,7 +54,9 @@ class main_test extends \board3\portal\tests\testframework\database_test_case
'\board3\portal\modules\clock' => new \board3\portal\modules\clock($this->config, $this->template),
);
$portal_helper = new \board3\portal\includes\helper($modules);
- $auth = $this->getMock('\phpbb\auth\auth', array('acl_get'));
+ $auth = $this->getMockBuilder('\phpbb\auth\auth')
+ ->setMethods(['acl_get'])
+ ->getMock();
$auth->expects($this->any())
->method('acl_get')
->with($this->anything())
diff --git a/tests/unit/event/listener_test.php b/tests/unit/event/listener_test.php
index 16692188..a0dc3fc9 100644
--- a/tests/unit/event/listener_test.php
+++ b/tests/unit/event/listener_test.php
@@ -36,9 +36,11 @@ class listener_test extends \phpbb_template_template_test_case
public function setup_listener()
{
- global $cache, $db, $phpbb_root_path, $phpEx;
+ global $cache, $db, $phpbb_root_path, $phpEx, $phpbb_admin_path;
- $cache = $this->getMock('\phpbb\cache\cache', array('obtain_word_list', 'get', 'sql_exists', 'put', 'obtain_attach_extensions'));
+ $cache = $this->getMockBuilder('\phpbb\cache\driver\dummy')
+ ->setMethods(['obtain_word_list', 'get', 'sql_exists', 'put', 'obtain_attach_extensions'])
+ ->getMock();
$cache->expects($this->any())
->method('obtain_word_list')
->with()
@@ -47,14 +49,24 @@ class listener_test extends \phpbb_template_template_test_case
->method('get')
->with($this->anything())
->will($this->returnValue(false));
- $db = $this->getMock('\phpbb\db\driver\driver_interface');
+ $db = $this->getMockBuilder('\phpbb\db\driver\driver_interface')
+ ->getMock();
$this->language_file_loader = new \phpbb\language\language_file_loader($phpbb_root_path, 'php');
$this->language = new \phpbb\language\language($this->language_file_loader);
- $this->user = $this->getMock('\phpbb\user', array(), array($this->language, '\phpbb\datetime'));
+ $this->user = $this->getMockBuilder('\phpbb\user')
+ ->setConstructorArgs([$this->language, '\phpbb\datetime'])
+ ->getMock();
$this->user->expects($this->any())
->method('lang')
->will($this->returnValue('foo'));
+ $this->auth = $this->getMockBuilder('\phpbb\auth\auth')
+ ->disableOriginalConstructor()
+ ->getMock();
+ $this->auth->expects($this->any())
+ ->method('acl_get')
+ ->with($this->anything())
+ ->will($this->returnValue(true));
$manager = new \phpbb_mock_extension_manager(dirname(__FILE__) . '/', array());
$finder = new \phpbb\finder(
@@ -83,7 +95,26 @@ class listener_test extends \phpbb_template_template_test_case
$routes = $router->get_routes();
$symfony_request = new \phpbb\symfony_request($request);
$routing_helper = new \phpbb\routing\helper($this->config, $router, $symfony_request, $request, $filesystem, $phpbb_root_path, 'php');
- $this->controller_helper = new mock_controller_helper($this->template, $this->user, $this->config, $symfony_request, $request, $routing_helper);
+ $cron_manager = $this->getMockBuilder('\phpbb\cron\manager')->disableOriginalConstructor()->getMock();
+ $dispatcher = $this->getMockBuilder('\phpbb\event\dispatcher')->getMock();
+ $language = $this->getMockBuilder('\phpbb\language\language')->disableOriginalConstructor()->getMock();
+ $this->controller_helper = new mock_controller_helper(
+ $this->auth,
+ $cache,
+ $this->config,
+ $cron_manager,
+ $db,
+ $dispatcher,
+ $language,
+ $request,
+ $routing_helper,
+ $symfony_request,
+ $this->template,
+ $this->user,
+ $phpbb_root_path,
+ $phpbb_admin_path,
+ $phpEx
+ );
$this->path_helper = new \phpbb\path_helper(
new \phpbb\symfony_request(
@@ -95,14 +126,6 @@ class listener_test extends \phpbb_template_template_test_case
$this->php_ext
);
- $this->auth = $this->getMockBuilder('\phpbb\auth\auth')
- ->disableOriginalConstructor()
- ->getMock();
- $this->auth->expects($this->any())
- ->method('acl_get')
- ->with($this->anything())
- ->will($this->returnValue(true));
-
$this->controller = $this->getMockBuilder('\board3\portal\controller\main')
->disableOriginalConstructor()
->getMock();
diff --git a/tests/unit/functions/fetch_news_test.php b/tests/unit/functions/fetch_news_test.php
index 8d22d841..52dc1cef 100644
--- a/tests/unit/functions/fetch_news_test.php
+++ b/tests/unit/functions/fetch_news_test.php
@@ -30,7 +30,9 @@ class phpbb_functions_fetch_news_test extends \board3\portal\tests\testframework
$user->add_lang('../../ext/board3/portal/language/en/portal');
$request = new \phpbb_mock_request;
$phpbb_dispatcher = new phpbb_mock_event_dispatcher();
- $cache = $this->getMock('\phpbb\cache\cache', array('obtain_word_list', 'get', 'sql_exists', 'put', 'obtain_attach_extensions', 'sql_load', 'sql_save'));
+ $cache = $this->getMockBuilder('\phpbb\cache\driver\dummy')
+ ->setMethods(['obtain_word_list', 'get', 'sql_exists', 'put', 'obtain_attach_extensions', 'sql_load', 'sql_save'])
+ ->getMock();
$cache->expects($this->any())
->method('obtain_word_list')
->with()
@@ -66,7 +68,9 @@ class phpbb_functions_fetch_news_test extends \board3\portal\tests\testframework
$this->modules_helper = new \board3\portal\includes\modules_helper($auth, $this->config, $controller_helper, $request);
$phpbb_container->set('board3.portal.modules_helper', $this->modules_helper);
$phpbb_container->set('board3.portal.fetch_posts', new \board3\portal\portal\fetch_posts($auth, $cache, $this->config, $this->db, $this->modules_helper, $user));
- $template = $this->getMock('\phpbb\template', array('set_filenames', 'destroy_block_vars', 'assign_block_vars', 'assign_display'));
+ $template = $this->getMockBuilder('\phpbb\template')
+ ->setMethods(['set_filenames', 'destroy_block_vars', 'assign_block_vars', 'assign_display'])
+ ->getMock();
}
public function getDataSet()
@@ -200,7 +204,7 @@ class phpbb_functions_fetch_news_test extends \board3\portal\tests\testframework
if ($expected_exception)
{
- $this->setExpectedException($expected_exception);
+ $this->expectException($expected_exception);
}
$fetch_posts = phpbb_fetch_posts($module_id, $forum_from, $permissions, $number_of_posts, $text_length, $time, $type, $start, $invert);
@@ -241,7 +245,9 @@ class phpbb_functions_fetch_news_test extends \board3\portal\tests\testframework
{
global $cache, $phpbb_container;
- $cache = $this->getMock('\phpbb\cache\cache', array('obtain_word_list', 'get', 'sql_exists', 'put'));
+ $cache = $this->getMockBuilder('\phpbb\cache\driver\dummy')
+ ->setMethods(['obtain_word_list', 'get', 'sql_exists', 'put'])
+ ->getMock();
$cache->expects($this->any())
->method('obtain_word_list')
->with()
diff --git a/tests/unit/functions/functions_test.php b/tests/unit/functions/functions_test.php
index 574faf61..9263e2cd 100644
--- a/tests/unit/functions/functions_test.php
+++ b/tests/unit/functions/functions_test.php
@@ -25,8 +25,13 @@ class phpbb_unit_functions_functions_test extends \board3\portal\tests\testframe
$this->language_file_loader = new \phpbb\language\language_file_loader($phpbb_root_path, 'php');
$this->language = new \phpbb\language\language($this->language_file_loader);
- $user = $this->getMock('\phpbb\user', array('optionget'), array($this->language, '\phpbb\datetime'));
- $cache = $this->getMock('\phpbb\cache\cache', array('obtain_word_list', 'sql_exists'));
+ $user = $this->getMockBuilder('\phpbb\user')
+ ->setMethods(['optionget'])
+ ->setConstructorArgs([$this->language, '\phpbb\datetime'])
+ ->getMock();
+ $cache = $this->getMockBuilder('\phpbb\cache\driver\dummy')
+ ->setMethods(['obtain_word_list', 'sql_exists'])
+ ->getMock();
$cache->expects($this->any())
->method('obtain_word_list')
->with()
diff --git a/tests/unit/functions/get_user_groups_test.php b/tests/unit/functions/get_user_groups_test.php
index 7ef421d4..75fce0b7 100644
--- a/tests/unit/functions/get_user_groups_test.php
+++ b/tests/unit/functions/get_user_groups_test.php
@@ -22,8 +22,13 @@ class phpbb_unit_functions_get_user_groups_test extends \board3\portal\tests\tes
$this->language_file_loader = new \phpbb\language\language_file_loader($phpbb_root_path, 'php');
$this->language = new \phpbb\language\language($this->language_file_loader);
- $user = $this->getMock('\phpbb\user', array('optionget'), array($this->language, '\phpbb\datetime'));
- $cache = $this->getMock('\phpbb\cache\cache', array('get', 'put', 'sql_exists'));
+ $user = $this->getMockBuilder('\phpbb\user')
+ ->setMethods(['optionget'])
+ ->setConstructorArgs([$this->language, '\phpbb\datetime'])
+ ->getMock();
+ $cache = $this->getMockBuilder('\phpbb\cache\driver\dummy')
+ ->setMethods(['get', 'put', 'sql_exists'])
+ ->getMock();
$cache->expects($this->any())
->method('get')
->with($this->anything())
diff --git a/tests/unit/includes/modules_helper_test.php b/tests/unit/includes/modules_helper_test.php
index 40bd3cd2..b7e023b4 100644
--- a/tests/unit/includes/modules_helper_test.php
+++ b/tests/unit/includes/modules_helper_test.php
@@ -36,7 +36,9 @@ class board3_includes_modules_helper_test extends \board3\portal\tests\testframe
$controller_helper = new \board3\portal\tests\mock\controller_helper($phpbb_root_path, $phpEx);
$controller_helper->add_route('board3_portal_controller', 'portal');
$phpbb_container = new \phpbb_mock_container_builder();
- $phpbb_dispatcher = $this->getMock('\phpbb\event\dispatcher', array('trigger_event'), array($phpbb_container));
+ $phpbb_dispatcher = $this->getMockBuilder('\phpbb\event\dispatcher')
+ ->setMethods(['trigger_event'])
+ ->getMock();
$phpbb_dispatcher->expects($this->any())
->method('trigger_event')
->with($this->anything())
diff --git a/tests/unit/modules/birthday_list_test.php b/tests/unit/modules/birthday_list_test.php
index 97e0cc46..0d32fb1a 100644
--- a/tests/unit/modules/birthday_list_test.php
+++ b/tests/unit/modules/birthday_list_test.php
@@ -45,7 +45,9 @@ class phpbb_unit_modules_birthday_list_test extends \board3\portal\tests\testfra
$this->user->timezone = new \DateTimeZone('UTC');
$this->user->add_lang('common');
$this->birthday_list = new \board3\portal\modules\birthday_list($this->config, $this->template, $this->new_dbal(), $this->user);
- $auth = $this->getMock('\phpbb\auth\auth', array('acl_get'));
+ $auth = $this->getMockBuilder('\phpbb\auth\auth')
+ ->setMethods(['acl_get'])
+ ->getMock();
$auth->expects($this->any())
->method('acl_get')
->with($this->anything())
diff --git a/tests/unit/modules/calendar_test.php b/tests/unit/modules/calendar_test.php
index 3dafdfeb..6a390127 100644
--- a/tests/unit/modules/calendar_test.php
+++ b/tests/unit/modules/calendar_test.php
@@ -80,7 +80,9 @@ class phpbb_unit_modules_calendar_test extends \board3\portal\tests\testframewor
$this->calendar = new \board3\portal\modules\calendar(self::$config, $modules_helper, $this->template, $db, $this->request, dirname(__FILE__) . '/../../../', 'php', $user, $this->path_helper, $log);
define('PORTAL_MODULES_TABLE', 'phpbb_portal_modules');
define('PORTAL_CONFIG_TABLE', 'phpbb_portal_config');
- $cache = $this->getMock('\phpbb\cache\cache', array('destroy', 'sql_exists', 'get', 'put'));
+ $cache = $this->getMockBuilder('\phpbb\cache\driver\dummy')
+ ->setMethods(['destroy', 'sql_exists', 'get', 'put'])
+ ->getMock();
$cache->expects($this->any())
->method('destroy')
->with($this->equalTo('portal_config'));
diff --git a/tests/unit/modules/welcome_test.php b/tests/unit/modules/welcome_test.php
index ba07fb94..18b548ff 100644
--- a/tests/unit/modules/welcome_test.php
+++ b/tests/unit/modules/welcome_test.php
@@ -48,7 +48,9 @@ class phpbb_unit_modules_welcome_test extends \board3\portal\tests\testframework
$this->language = new \phpbb\language\language($this->language_file_loader);
$this->user = new \phpbb\user($this->language, '\phpbb\datetime');
$user = $this->user;
- $cache = $this->getMock('\phpbb\cache\cache', array('destroy', 'sql_exists', 'get', 'put', 'sql_load'));
+ $cache = $this->getMockBuilder('\phpbb\cache\driver\dummy')
+ ->setMethods(['destroy', 'sql_exists', 'get', 'put', 'sql_load'])
+ ->getMock();
$cache->expects($this->any())
->method('destroy')
->with($this->equalTo('portal_config'));
@@ -74,12 +76,16 @@ class phpbb_unit_modules_welcome_test extends \board3\portal\tests\testframework
->with($this->anything())
->will($this->returnArgument(1));
$phpbb_container = new \phpbb_mock_container_builder();
+ $phpbb_log = $this->getMockBuilder('\phpbb\log\log')
+ ->disableOriginalConstructor()
+ ->getMock();
$s9e_factory = new \phpbb\textformatter\s9e\factory(
new \phpbb\textformatter\data_access($this->db, BBCODES_TABLE, SMILIES_TABLE, STYLES_TABLE, WORDS_TABLE, $phpbb_root_path . 'styles/'),
new \phpbb\cache\driver\dummy(),
$phpbb_dispatcher,
$config,
new \phpbb\textformatter\s9e\link_helper(),
+ $phpbb_log,
$phpbb_root_path . 'cache',
'_text_formatter_parser',
'_text_formatter_renderer'
diff --git a/tests/unit/portal/fetch_posts_test.php b/tests/unit/portal/fetch_posts_test.php
index 39fa52f5..02cd41ec 100644
--- a/tests/unit/portal/fetch_posts_test.php
+++ b/tests/unit/portal/fetch_posts_test.php
@@ -34,7 +34,9 @@ class phpbb_portal_fetch_posts_test extends \board3\portal\tests\testframework\d
$user->add_lang('common');
$user->add_lang('../../ext/board3/portal/language/en/portal');
$phpbb_dispatcher = new phpbb_mock_event_dispatcher();
- $cache = $this->getMock('\phpbb\cache\cache', array('obtain_word_list', 'get', 'sql_exists', 'put', 'obtain_attach_extensions', 'sql_load', 'sql_save'));
+ $cache = $this->getMockBuilder('\phpbb\cache\driver\dummy')
+ ->setMethods(['obtain_word_list', 'get', 'sql_exists', 'put', 'obtain_attach_extensions', 'sql_load', 'sql_save'])
+ ->getMock();
$cache->expects($this->any())
->method('obtain_word_list')
->with()
@@ -67,7 +69,9 @@ class phpbb_portal_fetch_posts_test extends \board3\portal\tests\testframework\d
$controller_helper->add_route('board3_portal_controller', 'portal');
$this->modules_helper = new \board3\portal\includes\modules_helper($auth, $this->config, $controller_helper, new phpbb_mock_request());
$this->user = $user;
- $template = $this->getMock('\phpbb\template', array('set_filenames', 'destroy_block_vars', 'assign_block_vars', 'assign_display'));
+ $template = $this->getMockBuilder('\phpbb\template')
+ ->setMethods(['set_filenames', 'destroy_block_vars', 'assign_block_vars', 'assign_display'])
+ ->getMock();
$this->fetch_posts = new \board3\portal\portal\fetch_posts($auth, $cache, $this->config, $this->db, $this->modules_helper, $user);
}
@@ -202,7 +206,7 @@ class phpbb_portal_fetch_posts_test extends \board3\portal\tests\testframework\d
if ($expected_exception)
{
- $this->setExpectedException($expected_exception);
+ $this->expectException($expected_exception);
}
$this->fetch_posts->set_module_id($module_id);
@@ -244,7 +248,9 @@ class phpbb_portal_fetch_posts_test extends \board3\portal\tests\testframework\d
{
global $cache;
- $cache = $this->getMock('\phpbb\cache\cache', array('obtain_word_list', 'get', 'sql_exists', 'put'));
+ $cache = $this->getMockBuilder('\phpbb\cache\driver\dummy')
+ ->setMethods(['obtain_word_list', 'get', 'sql_exists', 'put'])
+ ->getMock();
$cache->expects($this->any())
->method('obtain_word_list')
->with()
diff --git a/tests/unit/portal/modules_manager_confirm_box_test.php b/tests/unit/portal/modules_manager_confirm_box_test.php
index 127df79d..0b406222 100644
--- a/tests/unit/portal/modules_manager_confirm_box_test.php
+++ b/tests/unit/portal/modules_manager_confirm_box_test.php
@@ -63,7 +63,9 @@ class modules_manager_confirm_box_test extends \board3\portal\tests\testframewor
));
$this->portal_columns = new \board3\portal\portal\columns();
- $this->cache = $this->getMock('\phpbb\cache\cache', array('destroy', 'sql_exists', 'get', 'put', 'purge'));
+ $this->cache = $this->getMockBuilder('\phpbb\cache\driver\dummy')
+ ->setMethods(['destroy', 'sql_exists', 'get', 'put', 'purge'])
+ ->getMock();
$this->cache->expects($this->any())
->method('destroy')
->withConsecutive(array($this->equalTo('config')), array($this->equalTo('portal_config')));
@@ -147,7 +149,9 @@ class modules_manager_confirm_box_test extends \board3\portal\tests\testframewor
public function test_module_delete()
{
- $this->cache = $this->getMock('\phpbb\cache\cache', array('destroy', 'sql_exists', 'get', 'put', 'purge'));
+ $this->cache = $this->getMockBuilder('\phpbb\cache\driver\dummy')
+ ->setMethods(['destroy', 'sql_exists', 'get', 'put', 'purge'])
+ ->getMock();
$this->cache->expects($this->any())
->method('destroy')
->with($this->equalTo('sql'));
diff --git a/tests/unit/portal/modules_manager_test.php b/tests/unit/portal/modules_manager_test.php
index 81b3ba0c..b0f7065d 100644
--- a/tests/unit/portal/modules_manager_test.php
+++ b/tests/unit/portal/modules_manager_test.php
@@ -55,7 +55,9 @@ class board3_portal_modules_manager_test extends \board3\portal\tests\testframew
));
$this->portal_columns = new \board3\portal\portal\columns();
- $cache = $this->getMock('\phpbb\cache\cache', array('destroy', 'sql_exists', 'get', 'put', 'sql_load', 'sql_save'));
+ $cache = $this->getMockBuilder('\phpbb\cache\driver\dummy')
+ ->setMethods(['destroy', 'sql_exists', 'get', 'put', 'sql_load', 'sql_save'])
+ ->getMock();
$cache->expects($this->any())
->method('destroy')
->with($this->equalTo('portal_modules'));