mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-01 14:30:32 +02:00
[ticket/13762] Moving language related functionality into a separate class
PHPBB3-13762
This commit is contained in:
@@ -37,7 +37,11 @@ class phpbb_datetime_from_format_test extends phpbb_test_case
|
||||
*/
|
||||
public function test_from_format($timezone, $format, $expected)
|
||||
{
|
||||
$user = new \phpbb\user('\phpbb\datetime');
|
||||
global $phpbb_root_path, $phpEx;
|
||||
|
||||
$lang_loader = new \phpbb\language\language_file_loader($phpbb_root_path, $phpEx);
|
||||
$lang = new \phpbb\language\language($lang_loader);
|
||||
$user = new \phpbb\user($lang, '\phpbb\datetime');
|
||||
$user->timezone = new DateTimeZone($timezone);
|
||||
$user->lang['datetime'] = array(
|
||||
'TODAY' => 'Today',
|
||||
@@ -107,7 +111,11 @@ class phpbb_datetime_from_format_test extends phpbb_test_case
|
||||
*/
|
||||
public function test_relative_format_date($timestamp, $forcedate, $expected)
|
||||
{
|
||||
$user = new \phpbb\user('\phpbb\datetime');
|
||||
global $phpbb_root_path, $phpEx;
|
||||
|
||||
$lang_loader = new \phpbb\language\language_file_loader($phpbb_root_path, $phpEx);
|
||||
$lang = new \phpbb\language\language($lang_loader);
|
||||
$user = new \phpbb\user($lang, '\phpbb\datetime');
|
||||
$user->timezone = new DateTimeZone('UTC');
|
||||
$user->lang['datetime'] = array(
|
||||
'TODAY' => 'Today',
|
||||
|
Reference in New Issue
Block a user