diff options
54 files changed, 145 insertions, 120 deletions
| diff --git a/phpBB/config/parameters.yml b/phpBB/config/parameters.yml new file mode 100644 index 0000000000..5bf2c678ee --- /dev/null +++ b/phpBB/config/parameters.yml @@ -0,0 +1,2 @@ +parameters: +    datetime.class: \phpbb\datetime diff --git a/phpBB/config/services.yml b/phpBB/config/services.yml index a9f9f5ed19..6b06deb256 100644 --- a/phpBB/config/services.yml +++ b/phpBB/config/services.yml @@ -10,6 +10,7 @@ imports:      - { resource: mimetype_guessers.yml }      - { resource: passwords.yml }      - { resource: profilefields.yml } +    - { resource: parameters.yml }  services:      acl.permissions: @@ -346,6 +347,8 @@ services:      user:          class: phpbb\user +        arguments: +            - %datetime.class%      user_loader:          class: phpbb\user_loader diff --git a/phpBB/download/file.php b/phpBB/download/file.php index 984de2165f..fd94e78fee 100644 --- a/phpBB/download/file.php +++ b/phpBB/download/file.php @@ -224,12 +224,12 @@ else  		else  		{  			// Attachment is in a private message. -			$row['forum_id'] = false; +			$post_row = array('forum_id' => false);  			phpbb_download_handle_pm_auth($db, $auth, $user->data['user_id'], $attachment['post_msg_id']);  		}  		$extensions = array(); -		if (!extension_allowed($row['forum_id'], $attachment['extension'], $extensions)) +		if (!extension_allowed($post_row['forum_id'], $attachment['extension'], $extensions))  		{  			send_status_line(403, 'Forbidden');  			trigger_error(sprintf($user->lang['EXTENSION_DISABLED_AFTER_POSTING'], $attachment['extension'])); diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index f23b9840c6..d7554588c5 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -1061,7 +1061,7 @@ function phpbb_timezone_select($user, $default = '', $truncate = false)  		foreach ($unsorted_timezones as $timezone)  		{  			$tz = new DateTimeZone($timezone); -			$dt = new \phpbb\datetime($user, 'now', $tz); +			$dt = $user->create_datetime('now', $tz);  			$offset = $dt->getOffset();  			$current_time = $dt->format($user->lang['DATETIME_FORMAT'], true);  			$offset_string = phpbb_format_timezone_offset($offset); @@ -4892,7 +4892,7 @@ function page_header($page_title = '', $display_online_list = false, $item_id =  		}  	} -	$dt = new \phpbb\datetime($user, 'now', $user->timezone); +	$dt = $user->create_datetime();  	$timezone_offset = 'GMT' . phpbb_format_timezone_offset($dt->getOffset());  	$timezone_name = $user->timezone->getName();  	if (isset($user->lang['timezones'][$timezone_name])) @@ -5052,6 +5052,20 @@ function page_header($page_title = '', $display_online_list = false, $item_id =  		'SITE_LOGO_IMG'			=> $user->img('site_logo'),  	)); +	// An array of http headers that phpbb will set. The following event may override these. +	$http_headers = array( +		// application/xhtml+xml not used because of IE +		'Content-type' => 'text/html; charset=UTF-8', +		'Cache-Control' => 'private, no-cache="set-cookie"', +		'Expires' => '0', +		'Pragma' => 'no-cache', +	); +	if (!empty($user->data['is_bot'])) +	{ +		// Let reverse proxies know we detected a bot. +		$http_headers['X-PHPBB-IS-BOT'] = 'yes'; +	} +  	/**  	* Execute code and/or overwrite _common_ template variables after they have been assigned.  	* @@ -5062,23 +5076,16 @@ function page_header($page_title = '', $display_online_list = false, $item_id =  	*									session item, e.g. forum for  	*									session_forum_id  	* @var	int		item_id				Restrict online users to item id +	* @var	array		http_headers			HTTP headers that should be set by phpbb  	*  	* @since 3.1.0-b3  	*/ -	$vars = array('page_title', 'display_online_list', 'item_id', 'item'); +	$vars = array('page_title', 'display_online_list', 'item_id', 'item', 'http_headers');  	extract($phpbb_dispatcher->trigger_event('core.page_header_after', compact($vars))); -	// application/xhtml+xml not used because of IE -	header('Content-type: text/html; charset=UTF-8'); - -	header('Cache-Control: private, no-cache="set-cookie"'); -	header('Expires: 0'); -	header('Pragma: no-cache'); - -	if (!empty($user->data['is_bot'])) +	foreach ($http_headers as $hname => $hval)  	{ -		// Let reverse proxies know we detected a bot. -		header('X-PHPBB-IS-BOT: yes'); +		header((string) $hname . ': ' . (string) $hval);  	}  	return; diff --git a/phpBB/includes/functions_acp.php b/phpBB/includes/functions_acp.php index dc3d745d53..d9dc11239c 100644 --- a/phpBB/includes/functions_acp.php +++ b/phpBB/includes/functions_acp.php @@ -107,12 +107,31 @@ function adm_page_header($page_title)  		'S_CONTENT_FLOW_END'	=> ($user->lang['DIRECTION'] == 'ltr') ? 'right' : 'left',  	)); -	// application/xhtml+xml not used because of IE -	header('Content-type: text/html; charset=UTF-8'); +	// An array of http headers that phpbb will set. The following event may override these. +	$http_headers = array( +		// application/xhtml+xml not used because of IE +		'Content-type' => 'text/html; charset=UTF-8', +		'Cache-Control' => 'private, no-cache="set-cookie"', +		'Expires' => '0', +		'Pragma' => 'no-cache', +	); -	header('Cache-Control: private, no-cache="set-cookie"'); -	header('Expires: 0'); -	header('Pragma: no-cache'); +	/** +	* Execute code and/or overwrite _common_ template variables after they have been assigned. +	* +	* @event core.adm_page_header_after +	* @var	string	page_title			Page title +	* @var	array	http_headers			HTTP headers that should be set by phpbb +	* +	* @since 3.1.0-RC3 +	*/ +	$vars = array('page_title', 'http_headers'); +	extract($phpbb_dispatcher->trigger_event('core.adm_page_header_after', compact($vars))); + +	foreach ($http_headers as $hname => $hval) +	{ +		header((string) $hname . ': ' . (string) $hval); +	}  	return;  } diff --git a/phpBB/includes/functions_messenger.php b/phpBB/includes/functions_messenger.php index 3657a89aa0..045e555d05 100644 --- a/phpBB/includes/functions_messenger.php +++ b/phpBB/includes/functions_messenger.php @@ -402,17 +402,9 @@ class messenger  	*/  	function generate_message_id()  	{ -		global $config; +		global $config, $request; -		$domain = 'phpbb.generated'; -		if ($config['server_name']) -		{ -			$domain = $config['server_name']; -		} -		else if (!empty($_SERVER['SERVER_NAME'])) -		{ -			$domain = $_SERVER['SERVER_NAME']; -		} +		$domain = ($config['server_name']) ?: $request->server('SERVER_NAME', 'phpbb.generated');  		return md5(unique_id(time())) . '@' . $domain;  	} diff --git a/phpBB/install/index.php b/phpBB/install/index.php index 395aff6c7d..2e497da3db 100644 --- a/phpBB/install/index.php +++ b/phpBB/install/index.php @@ -240,7 +240,7 @@ $sub = $request->variable('sub', '');  // Set PHP error handler to ours  set_error_handler(defined('PHPBB_MSG_HANDLER') ? PHPBB_MSG_HANDLER : 'msg_handler'); -$user = new \phpbb\user(); +$user = new \phpbb\user('\phpbb\datetime');  $auth = new \phpbb\auth\auth();  // Add own hook handler, if present. :o diff --git a/phpBB/phpbb/db/migration/data/v310/soft_delete_mod_convert.php b/phpBB/phpbb/db/migration/data/v310/soft_delete_mod_convert.php index 6335c75398..58845b88ec 100644 --- a/phpBB/phpbb/db/migration/data/v310/soft_delete_mod_convert.php +++ b/phpBB/phpbb/db/migration/data/v310/soft_delete_mod_convert.php @@ -121,7 +121,7 @@ class soft_delete_mod_convert extends \phpbb\db\migration\migration  			new \phpbb\auth\auth(),  			$this->config,  			$this->db, -			new \phpbb\user(), +			new \phpbb\user('\phpbb\datetime'),  			$this->phpbb_root_path,  			$this->php_ext,  			$this->table_prefix . 'forums', diff --git a/phpBB/phpbb/user.php b/phpBB/phpbb/user.php index 4e90044395..ea98034434 100644 --- a/phpBB/phpbb/user.php +++ b/phpBB/phpbb/user.php @@ -31,6 +31,11 @@ class user extends \phpbb\session  	*/  	public $timezone; +	/** +	* @var string Class name of datetime object +	*/ +	protected $datetime; +  	var $lang_name = false;  	var $lang_id = false;  	var $lang_path; @@ -42,12 +47,14 @@ class user extends \phpbb\session  	/**  	* Constructor to set the lang path +	* @param string $datetime_class Class name of datetime class  	*/ -	function __construct() +	function __construct($datetime_class)  	{  		global $phpbb_root_path;  		$this->lang_path = $phpbb_root_path . 'language/'; +		$this->datetime = $datetime_class;  	}  	/** @@ -727,7 +734,7 @@ class user extends \phpbb\session  	public function create_datetime($time = 'now', \DateTimeZone $timezone = null)  	{  		$timezone = $timezone ?: $this->timezone; -		return new \phpbb\datetime($this, $time, $timezone); +		return new $this->datetime($this, $time, $timezone);  	}  	/** diff --git a/phpBB/styles/prosilver/theme/bidi.css b/phpBB/styles/prosilver/theme/bidi.css index f6e490f82a..0d98fe7a66 100644 --- a/phpBB/styles/prosilver/theme/bidi.css +++ b/phpBB/styles/prosilver/theme/bidi.css @@ -112,6 +112,15 @@  	text-align: right;  } +.rtl .dropdown-contents > li { +	padding-left: 15px; +	padding-right: 0; +} + +.rtl .dropdown-nonscroll > li { +	padding-left: 0; +} +  .rtl .dropdown li li {  	padding-left: 0;  	padding-right: 18px; @@ -601,8 +610,8 @@ li.breadcrumbs span:first-child > a {  /* Rollover buttons     Based on: http://wellstyled.com/css-nopreload-rollovers.html  ----------------------------------------*/ -.rtl .icon-button.dropdown-select { -	padding-left: 26px; +.rtl .dropdown-select { +	padding-left: 24px;  	padding-right: 8px;  } @@ -612,7 +621,12 @@ li.breadcrumbs span:first-child > a {  	margin-right: 2px;  } -.dropdown-select:after { +.rtl .dropdown-select.icon-button:before { +	margin-left: 4px; +	margin-right: 0; +} + +.rtl .dropdown-select:after {  	border-left: 0;  	border-right-style: solid;  	border-right-width: 1px; @@ -915,16 +929,6 @@ li.breadcrumbs span:first-child > a {  	float: left;  } -/* Jumpbox */ -.rtl fieldset.jumpbox { -	text-align: left; -} - -.rtl fieldset.quickmod { -	float: left; -	text-align: left; -} -  /* Posting page styles  ----------------------------------------*/ diff --git a/phpBB/styles/prosilver/theme/colours.css b/phpBB/styles/prosilver/theme/colours.css index 82542c8d86..df27467cf8 100644 --- a/phpBB/styles/prosilver/theme/colours.css +++ b/phpBB/styles/prosilver/theme/colours.css @@ -610,7 +610,7 @@ Colours and backgrounds for buttons.css  	color: #D31141;  } -.dropdown-select, .dropdown-select:visited { +.dropdown-select {  	color: #536482;  } diff --git a/phpBB/styles/prosilver/theme/responsive.css b/phpBB/styles/prosilver/theme/responsive.css index b9cbd4cdfb..3ef0044621 100644 --- a/phpBB/styles/prosilver/theme/responsive.css +++ b/phpBB/styles/prosilver/theme/responsive.css @@ -466,12 +466,6 @@ p.rightside {  	margin-bottom: 0;  } -fieldset.quickmod { -	width: auto; -	float: none; -	text-align: center; -} -  fieldset.display-options label {  	display: block;  	clear: both; @@ -509,14 +503,11 @@ fieldset.display-actions {  		margin: 0;  	} -	.action-bar > .pagination, fieldset.jumpbox { -		text-align: center; -	} -  	.action-bar > .pagination {  		float: none;  		clear: both;  		padding-bottom: 1px; +		text-align: center;  	}  	.action-bar > .pagination li.page-jump { diff --git a/tests/auth/provider_apache_test.php b/tests/auth/provider_apache_test.php index 2decf0f18c..68ad7b2c19 100644 --- a/tests/auth/provider_apache_test.php +++ b/tests/auth/provider_apache_test.php @@ -29,7 +29,7 @@ class phpbb_auth_provider_apache_test extends phpbb_database_test_case  		$db = $this->new_dbal();  		$config = new \phpbb\config\config(array());  		$this->request = $this->getMock('\phpbb\request\request'); -		$this->user = $this->getMock('\phpbb\user'); +		$this->user = new \phpbb\user('\phpbb\datetime');  		$driver_helper = new \phpbb\passwords\driver\helper($config);  		$passwords_drivers = array(  			'passwords.driver.bcrypt_2y'	=> new \phpbb\passwords\driver\bcrypt_2y($config, $driver_helper), diff --git a/tests/auth/provider_db_test.php b/tests/auth/provider_db_test.php index 23324f87f2..744f955531 100644 --- a/tests/auth/provider_db_test.php +++ b/tests/auth/provider_db_test.php @@ -39,7 +39,7 @@ class phpbb_auth_provider_db_test extends phpbb_database_test_case  			'max_login_attempts' 			=> 0,  			));  		$request = $this->getMock('\phpbb\request\request'); -		$user = $this->getMock('\phpbb\user'); +		$user = new \phpbb\user('\phpbb\datetime');  		$driver_helper = new \phpbb\passwords\driver\helper($config);  		$passwords_drivers = array(  			'passwords.driver.bcrypt_2y'	=> new \phpbb\passwords\driver\bcrypt_2y($config, $driver_helper), diff --git a/tests/auth/provider_oauth_token_storage_test.php b/tests/auth/provider_oauth_token_storage_test.php index 45daa9816b..71b49ff439 100644 --- a/tests/auth/provider_oauth_token_storage_test.php +++ b/tests/auth/provider_oauth_token_storage_test.php @@ -31,7 +31,7 @@ class phpbb_auth_provider_oauth_token_storage_test extends phpbb_database_test_c  		global $phpbb_root_path, $phpEx;  		$this->db = $this->new_dbal(); -		$this->user = $this->getMock('\phpbb\user'); +		$this->user = new \phpbb\user('\phpbb\datetime');  		$this->service_name = 'auth.provider.oauth.service.testing';  		$this->token_storage_table = 'phpbb_oauth_tokens'; diff --git a/tests/avatar/manager_test.php b/tests/avatar/manager_test.php index d8099b40d4..8463cdb6c2 100644 --- a/tests/avatar/manager_test.php +++ b/tests/avatar/manager_test.php @@ -266,7 +266,7 @@ class phpbb_avatar_manager_test extends \phpbb_test_case  	public function test_localize_errors()  	{ -		$user = $this->getMock('\phpbb\user'); +		$user = $this->getMock('\phpbb\user', array(), array('\phpbb\datetime'));  		$lang_array = array(  			array('FOOBAR_OFF', 'foobar_off'),  			array('FOOBAR_EXPLAIN', 'FOOBAR_EXPLAIN %s'), diff --git a/tests/console/cron/cron_list_test.php b/tests/console/cron/cron_list_test.php index 1059a3f221..22423304be 100644 --- a/tests/console/cron/cron_list_test.php +++ b/tests/console/cron/cron_list_test.php @@ -32,7 +32,7 @@ class phpbb_console_command_cron_list_test extends phpbb_test_case  	protected function setUp()  	{ -		$this->user = $this->getMock('\phpbb\user'); +		$this->user = $this->getMock('\phpbb\user', array(), array('\phpbb\datetime'));  		$this->user->method('lang')->will($this->returnArgument(0));  	} diff --git a/tests/console/cron/run_test.php b/tests/console/cron/run_test.php index 60bd74e1f0..029dc5249b 100644 --- a/tests/console/cron/run_test.php +++ b/tests/console/cron/run_test.php @@ -41,7 +41,7 @@ class phpbb_console_command_cron_run_test extends phpbb_database_test_case  		set_config(null, null, null, $this->config);  		$this->lock = new \phpbb\lock\db('cron_lock', $this->config, $this->db); -		$this->user = $this->getMock('\phpbb\user'); +		$this->user = $this->getMock('\phpbb\user', array(), array('\phpbb\datetime'));  		$this->user->method('lang')->will($this->returnArgument(0));  		$this->task = new phpbb_cron_task_simple(); diff --git a/tests/content_visibility/delete_post_test.php b/tests/content_visibility/delete_post_test.php index 7f31dd9b28..65dda3ce48 100644 --- a/tests/content_visibility/delete_post_test.php +++ b/tests/content_visibility/delete_post_test.php @@ -306,7 +306,7 @@ class phpbb_content_visibility_delete_post_test extends phpbb_database_test_case  			->will($this->returnValueMap(array(  				array('m_approve', 1, true),  			))); -		$user = $this->getMock('\phpbb\user'); +		$user = new \phpbb\user('\phpbb\datetime');  		$phpbb_dispatcher = new phpbb_mock_event_dispatcher(); diff --git a/tests/content_visibility/get_forums_visibility_sql_test.php b/tests/content_visibility/get_forums_visibility_sql_test.php index 7e4ce6577d..fe7ab36436 100644 --- a/tests/content_visibility/get_forums_visibility_sql_test.php +++ b/tests/content_visibility/get_forums_visibility_sql_test.php @@ -134,7 +134,7 @@ class phpbb_content_visibility_get_forums_visibility_sql_test extends phpbb_data  			->method('acl_getf')  			->with($this->stringContains('_'), $this->anything())  			->will($this->returnValueMap($permissions)); -		$user = $this->getMock('\phpbb\user'); +		$user = new \phpbb\user('\phpbb\datetime');  		$config = new phpbb\config\config(array());  		$content_visibility = new \phpbb\content_visibility($auth, $config, $db, $user, $phpbb_root_path, $phpEx, FORUMS_TABLE, POSTS_TABLE, TOPICS_TABLE, USERS_TABLE); diff --git a/tests/content_visibility/get_global_visibility_sql_test.php b/tests/content_visibility/get_global_visibility_sql_test.php index 082e0d76ab..43a80c792b 100644 --- a/tests/content_visibility/get_global_visibility_sql_test.php +++ b/tests/content_visibility/get_global_visibility_sql_test.php @@ -134,7 +134,7 @@ class phpbb_content_visibility_get_global_visibility_sql_test extends phpbb_data  			->method('acl_getf')  			->with($this->stringContains('_'), $this->anything())  			->will($this->returnValueMap($permissions)); -		$user = $this->getMock('\phpbb\user'); +		$user = new \phpbb\user('\phpbb\datetime');  		$config = new phpbb\config\config(array());  		$content_visibility = new \phpbb\content_visibility($auth, $config, $db, $user, $phpbb_root_path, $phpEx, FORUMS_TABLE, POSTS_TABLE, TOPICS_TABLE, USERS_TABLE); diff --git a/tests/content_visibility/get_visibility_sql_test.php b/tests/content_visibility/get_visibility_sql_test.php index 2d4f24f1c6..f718e6c29a 100644 --- a/tests/content_visibility/get_visibility_sql_test.php +++ b/tests/content_visibility/get_visibility_sql_test.php @@ -81,7 +81,7 @@ class phpbb_content_visibility_get_visibility_sql_test extends phpbb_database_te  			->method('acl_get')  			->with($this->stringContains('_'), $this->anything())  			->will($this->returnValueMap($permissions)); -		$user = $this->getMock('\phpbb\user'); +		$user = new \phpbb\user('\phpbb\datetime');  		$config = new phpbb\config\config(array());  		$content_visibility = new \phpbb\content_visibility($auth, $config, $db, $user, $phpbb_root_path, $phpEx, FORUMS_TABLE, POSTS_TABLE, TOPICS_TABLE, USERS_TABLE); diff --git a/tests/content_visibility/set_post_visibility_test.php b/tests/content_visibility/set_post_visibility_test.php index a596b45714..ab79fbc2ee 100644 --- a/tests/content_visibility/set_post_visibility_test.php +++ b/tests/content_visibility/set_post_visibility_test.php @@ -124,7 +124,7 @@ class phpbb_content_visibility_set_post_visibility_test extends phpbb_database_t  		$cache = new phpbb_mock_cache;  		$db = $this->new_dbal();  		$auth = $this->getMock('\phpbb\auth\auth'); -		$user = $this->getMock('\phpbb\user'); +		$user = new \phpbb\user('\phpbb\datetime');  		$config = new phpbb\config\config(array());  		$content_visibility = new \phpbb\content_visibility($auth, $config, $db, $user, $phpbb_root_path, $phpEx, FORUMS_TABLE, POSTS_TABLE, TOPICS_TABLE, USERS_TABLE); @@ -174,7 +174,7 @@ class phpbb_content_visibility_set_post_visibility_test extends phpbb_database_t  		$cache = new phpbb_mock_cache;  		$db = $this->new_dbal();  		$auth = $this->getMock('\phpbb\auth\auth'); -		$user = $this->getMock('\phpbb\user'); +		$user = new \phpbb\user('\phpbb\datetime');  		$config = new phpbb\config\config(array());  		$content_visibility = new \phpbb\content_visibility($auth, $config, $db, $user, $phpbb_root_path, $phpEx, FORUMS_TABLE, POSTS_TABLE, TOPICS_TABLE, USERS_TABLE); diff --git a/tests/content_visibility/set_topic_visibility_test.php b/tests/content_visibility/set_topic_visibility_test.php index 230474428c..4d02a55490 100644 --- a/tests/content_visibility/set_topic_visibility_test.php +++ b/tests/content_visibility/set_topic_visibility_test.php @@ -88,7 +88,7 @@ class phpbb_content_visibility_set_topic_visibility_test extends phpbb_database_  		$cache = new phpbb_mock_cache;  		$db = $this->new_dbal();  		$auth = $this->getMock('\phpbb\auth\auth'); -		$user = $this->getMock('\phpbb\user'); +		$user = new \phpbb\user('\phpbb\datetime');  		$config = new phpbb\config\config(array());  		$content_visibility = new \phpbb\content_visibility($auth, $config, $db, $user, $phpbb_root_path, $phpEx, FORUMS_TABLE, POSTS_TABLE, TOPICS_TABLE, USERS_TABLE); diff --git a/tests/controller/controller_test.php b/tests/controller/controller_test.php index 67faf83e29..58bcf0ef81 100644 --- a/tests/controller/controller_test.php +++ b/tests/controller/controller_test.php @@ -72,7 +72,7 @@ class phpbb_controller_controller_test extends phpbb_test_case  			include(__DIR__.'/phpbb/controller/foo.php');  		} -		$resolver = new \phpbb\controller\resolver(new \phpbb\user, $container, dirname(__FILE__) . '/'); +		$resolver = new \phpbb\controller\resolver(new \phpbb\user('\phpbb\datetime'), $container, dirname(__FILE__) . '/');  		$symfony_request = new Request();  		$symfony_request->attributes->set('_controller', 'foo.controller:handle'); diff --git a/tests/controller/helper_route_test.php b/tests/controller/helper_route_test.php index 206c3a4f0b..04bff81683 100644 --- a/tests/controller/helper_route_test.php +++ b/tests/controller/helper_route_test.php @@ -20,7 +20,7 @@ class phpbb_controller_helper_route_test extends phpbb_test_case  		global $phpbb_dispatcher, $phpbb_root_path, $phpEx;  		$phpbb_dispatcher = new phpbb_mock_event_dispatcher; -		$this->user = $this->getMock('\phpbb\user'); +		$this->user = new \phpbb\user('\phpbb\datetime');  		$phpbb_path_helper = new \phpbb\path_helper(  			new \phpbb\symfony_request(  				new phpbb_mock_request() diff --git a/tests/datetime/from_format_test.php b/tests/datetime/from_format_test.php index 88eec525a3..5f155adbbd 100644 --- a/tests/datetime/from_format_test.php +++ b/tests/datetime/from_format_test.php @@ -39,7 +39,7 @@ class phpbb_datetime_from_format_test extends phpbb_test_case  	{  		global $user; -		$user = new \phpbb\user(); +		$user = new \phpbb\user('\phpbb\datetime');  		$user->timezone = new DateTimeZone($timezone);  		$user->lang['datetime'] = array(  			'TODAY'		=> 'Today', diff --git a/tests/dbal/migrator_test.php b/tests/dbal/migrator_test.php index 4a1d15aea4..10a9444d63 100644 --- a/tests/dbal/migrator_test.php +++ b/tests/dbal/migrator_test.php @@ -60,7 +60,7 @@ class phpbb_dbal_migrator_test extends phpbb_database_test_case  		$container = new phpbb_mock_container_builder();  		$container->set('migrator', $migrator); -		$user = new \phpbb\user(); +		$user = new \phpbb\user('\phpbb\datetime');  		$this->extension_manager = new \phpbb\extension\manager(  			$container, diff --git a/tests/dbal/migrator_tool_module_test.php b/tests/dbal/migrator_tool_module_test.php index aeb69e27ac..08c3e979b8 100644 --- a/tests/dbal/migrator_tool_module_test.php +++ b/tests/dbal/migrator_tool_module_test.php @@ -32,7 +32,7 @@ class phpbb_dbal_migrator_tool_module_test extends phpbb_database_test_case  		$db = $this->db = $this->new_dbal();  		$this->cache = new \phpbb\cache\service(new \phpbb\cache\driver\null(), new \phpbb\config\config(array()), $this->db, $phpbb_root_path, $phpEx); -		$user = $this->user = new \phpbb\user(); +		$user = $this->user = new \phpbb\user('\phpbb\user');  		$cache = new phpbb_mock_cache;  		$phpbb_dispatcher = new phpbb_mock_event_dispatcher(); diff --git a/tests/extension/manager_test.php b/tests/extension/manager_test.php index 1e43c2a0a3..5ec8e60a68 100644 --- a/tests/extension/manager_test.php +++ b/tests/extension/manager_test.php @@ -154,7 +154,7 @@ class phpbb_extension_manager_test extends phpbb_database_test_case  		$phpbb_root_path = __DIR__ . './../../phpBB/';  		$php_ext = 'php';  		$table_prefix = 'phpbb_'; -		$user = new \phpbb\user(); +		$user = new \phpbb\user('\phpbb\user');  		$migrator = new \phpbb\db\migrator(  			$config, diff --git a/tests/extension/metadata_manager_test.php b/tests/extension/metadata_manager_test.php index 535e4fe0d5..8e27b39459 100644 --- a/tests/extension/metadata_manager_test.php +++ b/tests/extension/metadata_manager_test.php @@ -44,7 +44,7 @@ class phpbb_extension_metadata_manager_test extends phpbb_database_test_case  		$this->db_tools = new \phpbb\db\tools($this->db);  		$this->phpbb_root_path = dirname(__FILE__) . '/';  		$this->phpEx = 'php'; -		$this->user = new \phpbb\user(); +		$this->user = new \phpbb\user('\phpbb\datetime');  		$this->table_prefix = 'phpbb_';  		$this->template = new \phpbb\template\twig\twig( diff --git a/tests/functions/generate_string_list.php b/tests/functions/generate_string_list.php index 32a04c1501..cd1e37618a 100644 --- a/tests/functions/generate_string_list.php +++ b/tests/functions/generate_string_list.php @@ -22,7 +22,7 @@ class phpbb_generate_string_list_test extends phpbb_test_case  	{  		parent::setUp(); -		$this->user = new \phpbb\user(); +		$this->user = new \phpbb\user('\phpbb\datetime');  		$this->user->data = array('user_lang' => 'en');  		$this->user->add_lang('common');  	} diff --git a/tests/groupposition/legend_test.php b/tests/groupposition/legend_test.php index 4bad598a31..fe003e93a7 100644 --- a/tests/groupposition/legend_test.php +++ b/tests/groupposition/legend_test.php @@ -37,7 +37,7 @@ class phpbb_groupposition_legend_test extends phpbb_database_test_case  		$cache = new phpbb_mock_cache;  		$db = $this->new_dbal(); -		$user = new \phpbb\user; +		$user = new \phpbb\user('\phpbb\datetime');  		$user->lang = array();  		if ($throws_exception) @@ -55,7 +55,7 @@ class phpbb_groupposition_legend_test extends phpbb_database_test_case  		$cache = new phpbb_mock_cache;  		$db = $this->new_dbal(); -		$user = new \phpbb\user; +		$user = new \phpbb\user('\phpbb\datetime');  		$user->lang = array();  		$test_class = new \phpbb\groupposition\legend($db, $user); @@ -95,7 +95,7 @@ class phpbb_groupposition_legend_test extends phpbb_database_test_case  		$cache = new phpbb_mock_cache;  		$db = $this->new_dbal(); -		$user = new \phpbb\user; +		$user = new \phpbb\user('\phpbb\datetime');  		$user->lang = array();  		$test_class = new \phpbb\groupposition\legend($db, $user); @@ -183,7 +183,7 @@ class phpbb_groupposition_legend_test extends phpbb_database_test_case  		$cache = new phpbb_mock_cache;  		$db = $this->new_dbal(); -		$user = new \phpbb\user; +		$user = new \phpbb\user('\phpbb\datetime');  		$user->lang = array();  		$test_class = new \phpbb\groupposition\legend($db, $user); @@ -238,7 +238,7 @@ class phpbb_groupposition_legend_test extends phpbb_database_test_case  		$cache = new phpbb_mock_cache;  		$db = $this->new_dbal(); -		$user = new \phpbb\user; +		$user = new \phpbb\user('\phpbb\datetime');  		$user->lang = array();  		$test_class = new \phpbb\groupposition\legend($db, $user); @@ -293,7 +293,7 @@ class phpbb_groupposition_legend_test extends phpbb_database_test_case  		$cache = new phpbb_mock_cache;  		$db = $this->new_dbal(); -		$user = new \phpbb\user; +		$user = new \phpbb\user('\phpbb\datetime');  		$user->lang = array();  		$test_class = new \phpbb\groupposition\legend($db, $user); @@ -391,7 +391,7 @@ class phpbb_groupposition_legend_test extends phpbb_database_test_case  		$cache = new phpbb_mock_cache;  		$db = $this->new_dbal(); -		$user = new \phpbb\user; +		$user = new \phpbb\user('\phpbb\datetime');  		$user->lang = array();  		$test_class = new \phpbb\groupposition\legend($db, $user); diff --git a/tests/groupposition/teampage_test.php b/tests/groupposition/teampage_test.php index dbdeb35e9f..1e61e3ebfb 100644 --- a/tests/groupposition/teampage_test.php +++ b/tests/groupposition/teampage_test.php @@ -39,7 +39,7 @@ class phpbb_groupposition_teampage_test extends phpbb_database_test_case  		$cache = new phpbb_mock_cache;  		$db = $this->new_dbal(); -		$user = new \phpbb\user; +		$user = new \phpbb\user('\phpbb\datetime');  		$user->lang = array();  		if ($throws_exception) @@ -57,7 +57,7 @@ class phpbb_groupposition_teampage_test extends phpbb_database_test_case  		$cache = new phpbb_mock_cache;  		$db = $this->new_dbal(); -		$user = new \phpbb\user; +		$user = new \phpbb\user('\phpbb\datetime');  		$user->lang = array();  		$test_class = new \phpbb\groupposition\teampage($db, $user, $cache); @@ -141,7 +141,7 @@ class phpbb_groupposition_teampage_test extends phpbb_database_test_case  		$cache = new phpbb_mock_cache;  		$db = $this->new_dbal(); -		$user = new \phpbb\user; +		$user = new \phpbb\user('\phpbb\datetime');  		$user->lang = array();  		$test_class = new \phpbb\groupposition\teampage($db, $user, $cache); @@ -184,7 +184,7 @@ class phpbb_groupposition_teampage_test extends phpbb_database_test_case  		$cache = new phpbb_mock_cache;  		$db = $this->new_dbal(); -		$user = new \phpbb\user; +		$user = new \phpbb\user('\phpbb\datetime');  		$user->lang = array();  		$test_class = new \phpbb\groupposition\teampage($db, $user, $cache); @@ -251,7 +251,7 @@ class phpbb_groupposition_teampage_test extends phpbb_database_test_case  		$cache = new phpbb_mock_cache;  		$db = $this->new_dbal(); -		$user = new \phpbb\user; +		$user = new \phpbb\user('\phpbb\datetime');  		$user->lang = array();  		$test_class = new \phpbb\groupposition\teampage($db, $user, $cache); @@ -303,7 +303,7 @@ class phpbb_groupposition_teampage_test extends phpbb_database_test_case  		$cache = new phpbb_mock_cache;  		$db = $this->new_dbal(); -		$user = new \phpbb\user; +		$user = new \phpbb\user('\phpbb\datetime');  		$user->lang = array();  		$test_class = new \phpbb\groupposition\teampage($db, $user, $cache); @@ -466,7 +466,7 @@ class phpbb_groupposition_teampage_test extends phpbb_database_test_case  		$cache = new phpbb_mock_cache;  		$db = $this->new_dbal(); -		$user = new \phpbb\user; +		$user = new \phpbb\user('\phpbb\datetime');  		$user->lang = array();  		$test_class = new \phpbb\groupposition\teampage($db, $user, $cache); @@ -629,7 +629,7 @@ class phpbb_groupposition_teampage_test extends phpbb_database_test_case  		$cache = new phpbb_mock_cache;  		$db = $this->new_dbal(); -		$user = new \phpbb\user; +		$user = new \phpbb\user('\phpbb\datetime');  		$user->lang = array();  		$test_class = new \phpbb\groupposition\teampage($db, $user, $cache); diff --git a/tests/log/add_test.php b/tests/log/add_test.php index d7e3760f0f..bacc0c76f7 100644 --- a/tests/log/add_test.php +++ b/tests/log/add_test.php @@ -27,7 +27,7 @@ class phpbb_log_add_test extends phpbb_database_test_case  		$db = $this->new_dbal();  		$cache = new phpbb_mock_cache;  		$phpbb_dispatcher = new phpbb_mock_event_dispatcher(); -		$user = $this->getMock('\phpbb\user'); +		$user = new \phpbb\user('\phpbb\datetime');  		$auth = $this->getMock('\phpbb\auth\auth');  		$log = new \phpbb\log\log($db, $user, $auth, $phpbb_dispatcher, $phpbb_root_path, 'adm/', $phpEx, LOG_TABLE); @@ -56,7 +56,7 @@ class phpbb_log_add_test extends phpbb_database_test_case  		$db = $this->new_dbal();  		$cache = new phpbb_mock_cache;  		$phpbb_dispatcher = new phpbb_mock_event_dispatcher(); -		$user = $this->getMock('\phpbb\user'); +		$user = new \phpbb\user('\phpbb\datetime');  		$auth = $this->getMock('\phpbb\auth\auth');  		$log = new \phpbb\log\log($db, $user, $auth, $phpbb_dispatcher, $phpbb_root_path, 'adm/', $phpEx, LOG_TABLE); diff --git a/tests/log/delete_test.php b/tests/log/delete_test.php index b8be15efa5..ec43182a0c 100644 --- a/tests/log/delete_test.php +++ b/tests/log/delete_test.php @@ -30,7 +30,7 @@ class phpbb_log_delete_test extends phpbb_database_test_case  		$db = $this->new_dbal();  		$phpbb_dispatcher = new phpbb_mock_event_dispatcher(); -		$user = $this->getMock('\phpbb\user'); +		$user = new \phpbb\user('\phpbb\datetime');  		$user->data['user_id'] = 1;  		$auth = $this->getMock('\phpbb\auth\auth'); diff --git a/tests/log/function_add_log_test.php b/tests/log/function_add_log_test.php index 99d412537c..63e468498e 100644 --- a/tests/log/function_add_log_test.php +++ b/tests/log/function_add_log_test.php @@ -161,7 +161,7 @@ class phpbb_log_function_add_log_test extends phpbb_database_test_case  		$db = $this->new_dbal();  		$cache = new phpbb_mock_cache;  		$phpbb_dispatcher = new phpbb_mock_event_dispatcher(); -		$user = $this->getMock('\phpbb\user'); +		$user = $this->getMock('\phpbb\user', array(), array('\phpbb\datetime'));  		$auth = $this->getMock('\phpbb\auth\auth');  		$phpbb_log = new \phpbb\log\log($db, $user, $auth, $phpbb_dispatcher, $phpbb_root_path, 'adm/', $phpEx, LOG_TABLE); diff --git a/tests/notification/base.php b/tests/notification/base.php index a66e5986fd..bfa9d2a1a4 100644 --- a/tests/notification/base.php +++ b/tests/notification/base.php @@ -56,7 +56,7 @@ abstract class phpbb_tests_notification_base extends phpbb_database_test_case  			'allow_topic_notify'	=> true,  			'allow_forum_notify'	=> true,  		)); -		$user = $this->user = new \phpbb\user(); +		$user = $this->user = new \phpbb\user('\phpbb\datetime');  		$this->user_loader = new \phpbb\user_loader($this->db, $phpbb_root_path, $phpEx, 'phpbb_users');  		$auth = $this->auth = new phpbb_mock_notifications_auth();  		$cache = $this->cache = new \phpbb\cache\service( diff --git a/tests/notification/submit_post_base.php b/tests/notification/submit_post_base.php index bd926e2a98..684dd99280 100644 --- a/tests/notification/submit_post_base.php +++ b/tests/notification/submit_post_base.php @@ -85,7 +85,7 @@ abstract class phpbb_notification_submit_post_base extends phpbb_database_test_c  		$phpbb_dispatcher = new phpbb_mock_event_dispatcher();  		// User -		$user = $this->getMock('\phpbb\user'); +		$user = $this->getMock('\phpbb\user', array(), array('\phpbb\datetime'));  		$user->ip = '';  		$user->data = array(  			'user_id'		=> 2, diff --git a/tests/notification/user_list_trim_test.php b/tests/notification/user_list_trim_test.php index 851c9ec221..c43eff729c 100644 --- a/tests/notification/user_list_trim_test.php +++ b/tests/notification/user_list_trim_test.php @@ -53,7 +53,7 @@ class phpbb_notification_user_list_trim_test extends phpbb_database_test_case  				array('u_viewprofile', 1, false),  			))); -		$user = new \phpbb\user(); +		$user = new \phpbb\user('\phpbb\datetime');  		$user->data = array('user_lang' => 'en');  		$user->add_lang('common'); diff --git a/tests/pagination/pagination_test.php b/tests/pagination/pagination_test.php index ace8c1eed0..321d6c2caf 100644 --- a/tests/pagination/pagination_test.php +++ b/tests/pagination/pagination_test.php @@ -29,7 +29,7 @@ class phpbb_pagination_pagination_test extends phpbb_template_template_test_case  		global $phpbb_dispatcher;  		$phpbb_dispatcher = new phpbb_mock_event_dispatcher; -		$this->user = $this->getMock('\phpbb\user'); +		$this->user = $this->getMock('\phpbb\user', array(), array('\phpbb\datetime'));  		$this->user->expects($this->any())  			->method('lang')  			->will($this->returnCallback(array($this, 'return_callback_implode'))); diff --git a/tests/profilefields/type_bool_test.php b/tests/profilefields/type_bool_test.php index bdab179c8c..41c40ddb4b 100644 --- a/tests/profilefields/type_bool_test.php +++ b/tests/profilefields/type_bool_test.php @@ -25,7 +25,7 @@ class phpbb_profilefield_type_bool_test extends phpbb_test_case  	*/  	public function setUp()  	{ -		$user = $this->getMock('\phpbb\user'); +		$user = $this->getMock('\phpbb\user', array(), array('\phpbb\datetime'));  		$user->expects($this->any())  			->method('lang')  			->will($this->returnCallback(array($this, 'return_callback_implode'))); diff --git a/tests/profilefields/type_date_test.php b/tests/profilefields/type_date_test.php index 0ad2cde9fe..123955198e 100644 --- a/tests/profilefields/type_date_test.php +++ b/tests/profilefields/type_date_test.php @@ -25,7 +25,7 @@ class phpbb_profilefield_type_date_test extends phpbb_test_case  	*/  	public function setUp()  	{ -		$this->user = $this->getMock('\phpbb\user'); +		$this->user = $this->getMock('\phpbb\user', array(), array('\phpbb\datetime'));  		$this->user->expects($this->any())  			->method('lang')  			->will($this->returnCallback(array($this, 'return_callback_implode'))); diff --git a/tests/profilefields/type_dropdown_test.php b/tests/profilefields/type_dropdown_test.php index ebecbf97f0..3845a8e96b 100644 --- a/tests/profilefields/type_dropdown_test.php +++ b/tests/profilefields/type_dropdown_test.php @@ -25,7 +25,7 @@ class phpbb_profilefield_type_dropdown_test extends phpbb_test_case  	*/  	public function setUp()  	{ -		$user = $this->getMock('\phpbb\user'); +		$user = $this->getMock('\phpbb\user', array(), array('\phpbb\datetime'));  		$user->expects($this->any())  			->method('lang')  			->will($this->returnCallback(array($this, 'return_callback_implode'))); diff --git a/tests/profilefields/type_googleplus_test.php b/tests/profilefields/type_googleplus_test.php index 3e0af36a73..f3db6ef01f 100644 --- a/tests/profilefields/type_googleplus_test.php +++ b/tests/profilefields/type_googleplus_test.php @@ -21,7 +21,7 @@ class phpbb_profilefield_type_googleplus_test extends phpbb_test_case  	{  		parent::setUp(); -		$user = new \phpbb\user(); +		$user = new \phpbb\user('\phpbb\datetime');  		$user->add_lang('ucp');  		$request = $this->getMock('\phpbb\request\request');  		$template = $this->getMock('\phpbb\template\template'); diff --git a/tests/profilefields/type_int_test.php b/tests/profilefields/type_int_test.php index ac48c10a84..07b22525e2 100644 --- a/tests/profilefields/type_int_test.php +++ b/tests/profilefields/type_int_test.php @@ -24,7 +24,7 @@ class phpbb_profilefield_type_int_test extends phpbb_test_case  	*/  	public function setUp()  	{ -		$user = $this->getMock('\phpbb\user'); +		$user = $this->getMock('\phpbb\user', array(), array('\phpbb\datetime'));  		$user->expects($this->any())  			->method('lang')  			->will($this->returnCallback(array($this, 'return_callback_implode'))); diff --git a/tests/profilefields/type_string_test.php b/tests/profilefields/type_string_test.php index 2277526758..d5384e0ae8 100644 --- a/tests/profilefields/type_string_test.php +++ b/tests/profilefields/type_string_test.php @@ -30,7 +30,7 @@ class phpbb_profilefield_type_string_test extends phpbb_test_case  	{  		global $request, $user, $cache; -		$user = $this->getMock('\phpbb\user'); +		$user = $this->getMock('\phpbb\user', array(), array('\phpbb\datetime'));  		$cache = new phpbb_mock_cache;  		$user->expects($this->any())  			->method('lang') diff --git a/tests/profilefields/type_url_test.php b/tests/profilefields/type_url_test.php index a45a28e7c7..372c07418f 100644 --- a/tests/profilefields/type_url_test.php +++ b/tests/profilefields/type_url_test.php @@ -26,7 +26,7 @@ class phpbb_profilefield_type_url_test extends phpbb_test_case  	*/  	public function setUp()  	{ -		$user = $this->getMock('\phpbb\user'); +		$user = $this->getMock('\phpbb\user', array(), array('\phpbb\datetime'));  		$user->expects($this->any())  			->method('lang')  			->will($this->returnCallback(array($this, 'return_callback_implode'))); diff --git a/tests/security/base.php b/tests/security/base.php index 83d0649dfa..5519cac441 100644 --- a/tests/security/base.php +++ b/tests/security/base.php @@ -59,7 +59,7 @@ abstract class phpbb_security_test_base extends phpbb_test_case  		$phpbb_filesystem = new \phpbb\filesystem($symfony_request, $phpbb_root_path, $phpEx);  		// Set no user and trick a bit to circumvent errors -		$user = new \phpbb\user(); +		$user = new \phpbb\user('\phpbb\datetime');  		$user->lang = true;  		$user->browser				= $server['HTTP_USER_AGENT'];  		$user->referer				= ''; diff --git a/tests/template/template_test_case.php b/tests/template/template_test_case.php index 83446b5352..1250397401 100644 --- a/tests/template/template_test_case.php +++ b/tests/template/template_test_case.php @@ -65,7 +65,7 @@ class phpbb_template_template_test_case extends phpbb_test_case  		$defaults = $this->config_defaults();  		$config = new \phpbb\config\config(array_merge($defaults, $new_config)); -		$this->user = new \phpbb\user; +		$this->user = new \phpbb\user('\phpbb\datetime');  		$path_helper = new \phpbb\path_helper(  			new \phpbb\symfony_request( diff --git a/tests/test_framework/phpbb_functional_test_case.php b/tests/test_framework/phpbb_functional_test_case.php index c131754d23..49cc72363e 100644 --- a/tests/test_framework/phpbb_functional_test_case.php +++ b/tests/test_framework/phpbb_functional_test_case.php @@ -239,7 +239,7 @@ class phpbb_functional_test_case extends phpbb_test_case  		);  		$container = new phpbb_mock_container_builder();  		$container->set('migrator', $migrator); -		$user = new \phpbb\user(); +		$user = new \phpbb\user('\phpbb\datetime');  		$extension_manager = new \phpbb\extension\manager(  			$container, @@ -598,7 +598,7 @@ class phpbb_functional_test_case extends phpbb_test_case  		$db = $this->get_db();  		$phpbb_dispatcher = new phpbb_mock_event_dispatcher(); -		$user = $this->getMock('\phpbb\user'); +		$user = $this->getMock('\phpbb\user', array(), array('\phpbb\datetime'));  		$auth = $this->getMock('\phpbb\auth\auth');  		$phpbb_log = new \phpbb\log\log($db, $user, $auth, $phpbb_dispatcher, $phpbb_root_path, 'adm/', $phpEx, LOG_TABLE); @@ -637,7 +637,7 @@ class phpbb_functional_test_case extends phpbb_test_case  		$db = $this->get_db();  		$phpbb_dispatcher = new phpbb_mock_event_dispatcher(); -		$user = $this->getMock('\phpbb\user'); +		$user = $this->getMock('\phpbb\user', array(), array('\phpbb\datetime'));  		$auth = $this->getMock('\phpbb\auth\auth');  		$phpbb_log = new \phpbb\log\log($db, $user, $auth, $phpbb_dispatcher, $phpbb_root_path, 'adm/', $phpEx, LOG_TABLE); diff --git a/tests/user/lang_test.php b/tests/user/lang_test.php index 45c6b04c65..bb11bb63cb 100644 --- a/tests/user/lang_test.php +++ b/tests/user/lang_test.php @@ -17,7 +17,7 @@ class phpbb_user_lang_test extends phpbb_test_case  {  	public function test_user_lang_sprintf()  	{ -		$user = new \phpbb\user; +		$user = new \phpbb\user('\phpbb\datetime');  		$user->lang = array(  			'FOO'		=> 'BAR',  			'BARZ'		=> 'PENG', @@ -99,7 +99,7 @@ class phpbb_user_lang_test extends phpbb_test_case  		$this->assertEquals($user->lang('ARRY', 1, 's', 2), '1 post');  		// ticket PHPBB3-10345 - different plural rules, not just 0/1/2+ -		$user = new \phpbb\user; +		$user = new \phpbb\user('\phpbb\datetime');  		$user->lang = array(  			'PLURAL_RULE'		=> 13,  			'ARRY'		=> array( diff --git a/tests/version/version_fetch_test.php b/tests/version/version_fetch_test.php index aa0ebaaa26..05eac58a52 100644 --- a/tests/version/version_fetch_test.php +++ b/tests/version/version_fetch_test.php @@ -33,7 +33,7 @@ class phpbb_version_helper_fetch_test extends phpbb_test_case  			new \phpbb\config\config(array(  				'version'	=> '3.1.0',  			)), -			new \phpbb\user() +			new \phpbb\user('\phpbb\datetime')  		);  	} diff --git a/tests/version/version_test.php b/tests/version/version_test.php index bc4f2c0294..ba31c79a79 100644 --- a/tests/version/version_test.php +++ b/tests/version/version_test.php @@ -30,7 +30,7 @@ class phpbb_version_helper_test extends phpbb_test_case  			new \phpbb\config\config(array(  				'version'	=> '3.1.0',  			)), -			new \phpbb\user() +			new \phpbb\user('\phpbb\datetime')  		);  	} @@ -208,7 +208,7 @@ class phpbb_version_helper_test extends phpbb_test_case  				new \phpbb\config\config(array(  					'version'	=> $current_version,  				)), -				new \phpbb\user(), +				new \phpbb\user('\phpbb\datetime'),  			))  			->getMock()  		; @@ -318,7 +318,7 @@ class phpbb_version_helper_test extends phpbb_test_case  				new \phpbb\config\config(array(  					'version'	=> $current_version,  				)), -				new \phpbb\user(), +				new \phpbb\user('\phpbb\datetime'),  			))  			->getMock()  		; | 
