mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-11 22:08:54 +00:00
[ticket/10733] Fixing test
Changing expected and result in locator test PHPBB3-10733
This commit is contained in:
parent
f5bac7686b
commit
eaba2ed9ca
1 changed files with 7 additions and 7 deletions
|
@ -17,38 +17,38 @@ class phpbb_template_template_locate_test extends phpbb_template_template_test_c
|
||||||
// First element of the array is test name - keep them distinct
|
// First element of the array is test name - keep them distinct
|
||||||
array(
|
array(
|
||||||
'simple inheritance - only parent template exists',
|
'simple inheritance - only parent template exists',
|
||||||
|
dirname(__FILE__) . '/parent_templates/parent_only.html',
|
||||||
'parent_only.html',
|
'parent_only.html',
|
||||||
false,
|
false,
|
||||||
true,
|
true,
|
||||||
dirname(__FILE__) . '/parent_templates/parent_only.html',
|
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'simple inheritance - only child template exists',
|
'simple inheritance - only child template exists',
|
||||||
|
dirname(__FILE__) . '/templates/child_only.html',
|
||||||
'child_only.html',
|
'child_only.html',
|
||||||
false,
|
false,
|
||||||
true,
|
true,
|
||||||
dirname(__FILE__) . '/templates/child_only.html',
|
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'simple inheritance - both parent and child templates exist',
|
'simple inheritance - both parent and child templates exist',
|
||||||
|
dirname(__FILE__) . '/templates/parent_and_child.html',
|
||||||
'parent_and_child.html',
|
'parent_and_child.html',
|
||||||
false,
|
false,
|
||||||
true,
|
true,
|
||||||
dirname(__FILE__) . '/templates/parent_and_child.html',
|
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'find first template - only child template exists in main style',
|
'find first template - only child template exists in main style',
|
||||||
|
'child_only.html',
|
||||||
array('parent_only.html', 'child_only.html'),
|
array('parent_only.html', 'child_only.html'),
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
'child_only.html',
|
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'find first template - both templates exist in main style',
|
'find first template - both templates exist in main style',
|
||||||
|
'parent_and_child.html',
|
||||||
array('parent_and_child.html', 'child_only.html'),
|
array('parent_and_child.html', 'child_only.html'),
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
'parent_and_child.html',
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -56,14 +56,14 @@ class phpbb_template_template_locate_test extends phpbb_template_template_test_c
|
||||||
/**
|
/**
|
||||||
* @dataProvider template_data
|
* @dataProvider template_data
|
||||||
*/
|
*/
|
||||||
public function test_template($name, $files, $return_default, $return_full_path, $expected)
|
public function test_template($name, $expected, $files, $return_default, $return_full_path)
|
||||||
{
|
{
|
||||||
// Reset the engine state
|
// Reset the engine state
|
||||||
$this->setup_engine();
|
$this->setup_engine();
|
||||||
|
|
||||||
// Locate template
|
// Locate template
|
||||||
$result = $this->template->locate($files, $return_default, $return_full_path);
|
$result = $this->template->locate($files, $return_default, $return_full_path);
|
||||||
$this->assertEquals($result, $expected);
|
$this->assertSame($expected, $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function setup_engine(array $new_config = array())
|
protected function setup_engine(array $new_config = array())
|
||||||
|
|
Loading…
Add table
Reference in a new issue