aboutsummaryrefslogtreecommitdiffstats
path: root/tests/template
diff options
context:
space:
mode:
authorVjacheslav Trushkin <arty@phpbb.com>2012-04-01 19:28:37 +0300
committerVjacheslav Trushkin <arty@phpbb.com>2012-04-01 19:28:37 +0300
commitb548389207fbf8e7c0d3287cd8704f05119d853a (patch)
treeb463fab12ef66897d6c392d104ad618bfb5a6646 /tests/template
parent4b2ede433e9336cf115fdd41e5c88738b03aa448 (diff)
parent2b3cfa0f7b9690907e5a72f6e94e2dc51afbe96b (diff)
downloadforums-b548389207fbf8e7c0d3287cd8704f05119d853a.tar
forums-b548389207fbf8e7c0d3287cd8704f05119d853a.tar.gz
forums-b548389207fbf8e7c0d3287cd8704f05119d853a.tar.bz2
forums-b548389207fbf8e7c0d3287cd8704f05119d853a.tar.xz
forums-b548389207fbf8e7c0d3287cd8704f05119d853a.zip
Merge remote-tracking branch 'upstream/develop' into ticket/10665
* upstream/develop: [ticket/10733] Fixing test [ticket/10733] Removing static from data providers [ticket/10731] Fixed addquote() to work on opera browser. [ticket/10731] Fixed addquote() to work on opera browser. [Ticket/10675] Correct language string ATTACH_DISK_FULL [feature/event-dispatcher] Adding composer.phar to .gitignore for olympus [ticket/10705] Change WARNINGS_ZERO_TOTAL in subsilver2 [ticket/10705] Change WARNINGS_ZERO_TOTAL in prosilver [ticket/10705] Change WARNINGS_ZERO_TOTAL in en language [ticket/10675] Add disk full language string when posting attachments
Diffstat (limited to 'tests/template')
-rw-r--r--tests/template/template_inheritance_test.php2
-rw-r--r--tests/template/template_locate_test.php16
-rw-r--r--tests/template/template_test.php4
3 files changed, 11 insertions, 11 deletions
diff --git a/tests/template/template_inheritance_test.php b/tests/template/template_inheritance_test.php
index 7348da9a4a..a76658701a 100644
--- a/tests/template/template_inheritance_test.php
+++ b/tests/template/template_inheritance_test.php
@@ -14,7 +14,7 @@ class phpbb_template_template_inheritance_test extends phpbb_template_template_t
/**
* @todo put test data into templates/xyz.test
*/
- public static function template_data()
+ public function template_data()
{
return array(
// First element of the array is test name - keep them distinct
diff --git a/tests/template/template_locate_test.php b/tests/template/template_locate_test.php
index 591a6afe0c..89a4ae6fb1 100644
--- a/tests/template/template_locate_test.php
+++ b/tests/template/template_locate_test.php
@@ -11,44 +11,44 @@ require_once dirname(__FILE__) . '/template_test_case.php';
class phpbb_template_template_locate_test extends phpbb_template_template_test_case
{
- public static function template_data()
+ public function template_data()
{
return array(
// First element of the array is test name - keep them distinct
array(
'simple inheritance - only parent template exists',
+ dirname(__FILE__) . '/parent_templates/parent_only.html',
'parent_only.html',
false,
true,
- dirname(__FILE__) . '/parent_templates/parent_only.html',
),
array(
'simple inheritance - only child template exists',
+ dirname(__FILE__) . '/templates/child_only.html',
'child_only.html',
false,
true,
- dirname(__FILE__) . '/templates/child_only.html',
),
array(
'simple inheritance - both parent and child templates exist',
+ dirname(__FILE__) . '/templates/parent_and_child.html',
'parent_and_child.html',
false,
true,
- dirname(__FILE__) . '/templates/parent_and_child.html',
),
array(
'find first template - only child template exists in main style',
+ 'child_only.html',
array('parent_only.html', 'child_only.html'),
false,
false,
- 'child_only.html',
),
array(
'find first template - both templates exist in main style',
+ 'parent_and_child.html',
array('parent_and_child.html', 'child_only.html'),
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
*/
- 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
$this->setup_engine();
// Locate template
$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())
diff --git a/tests/template/template_test.php b/tests/template/template_test.php
index edf621e16c..739bbe9387 100644
--- a/tests/template/template_test.php
+++ b/tests/template/template_test.php
@@ -15,7 +15,7 @@ class phpbb_template_template_test extends phpbb_template_template_test_case
/**
* @todo put test data into templates/xyz.test
*/
- public static function template_data()
+ public function template_data()
{
return array(
/*
@@ -394,7 +394,7 @@ class phpbb_template_template_test extends phpbb_template_template_test_case
$this->run_template('php.html', array(), array(), array(), 'test', $cache_file);
}
- public static function alter_block_array_data()
+ public function alter_block_array_data()
{
return array(
array(