1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

[ticket/16549] Fix tests

PHPBB3-16549
This commit is contained in:
rxu
2020-08-10 15:02:25 +07:00
parent fc631040fd
commit ec565de6cb
43 changed files with 334 additions and 51 deletions

View File

@@ -32,6 +32,8 @@ class phpbb_template_extension_test extends phpbb_template_template_test_case
global $auth, $request, $symfony_request, $user;
$user = new phpbb_mock_user();
$user->optionset('user_id', 2);
$user->style['style_path'] = '';
$user->data['user_id'] = 2;
$auth = $this->getMockBuilder('phpbb\auth\auth')
->disableOriginalConstructor()
->setMethods(['acl_get'])

View File

@@ -493,7 +493,8 @@ class phpbb_template_template_test extends phpbb_template_template_test_case
array(
'loop_expressions.html',
array(),
array('loop' => array(array(),array(),array(),array(),array(),array()),),
// Do not use 'loop' as a block name to not override Twig's internal 'loop' object
array('loop1' => array(array(),array(),array(),array(),array(),array()),),
array(),
'yesnononoyesnoyesnonoyesnono',
),

View File

@@ -1,11 +1,11 @@
<!-- BEGIN loop -->
<!-- BEGIN loop1 -->
<!-- IF loop.S_ROW_NUM is divisible by(4) -->yes<!-- ELSE -->no<!-- ENDIF -->
<!-- IF loop1.S_ROW_NUM is divisible by(4) -->yes<!-- ELSE -->no<!-- ENDIF -->
<!-- END loop -->
<!-- END loop1 -->
<!-- BEGIN loop -->
<!-- BEGIN loop1 -->
<!-- IF loop.S_ROW_NUM is divisible by(3) -->yes<!-- ELSE -->no<!-- ENDIF -->
<!-- IF loop1.S_ROW_NUM is divisible by(3) -->yes<!-- ELSE -->no<!-- ENDIF -->
<!-- END loop -->
<!-- END loop1 -->