aboutsummaryrefslogtreecommitdiffstats
path: root/tests/template
diff options
context:
space:
mode:
authorIgor Wiedler <igor@wiedler.ch>2011-01-03 22:21:54 +0100
committerIgor Wiedler <igor@wiedler.ch>2011-01-04 22:54:01 +0100
commit9a52bd030189280f48a35d3b9e52f9d77071cb5e (patch)
treeca295d6b56ca1e6bcf5617ba42bf4c6f43af7c8d /tests/template
parentc54683be8c0493a51d9a1dbf4c605e95d17940b2 (diff)
downloadforums-9a52bd030189280f48a35d3b9e52f9d77071cb5e.tar
forums-9a52bd030189280f48a35d3b9e52f9d77071cb5e.tar.gz
forums-9a52bd030189280f48a35d3b9e52f9d77071cb5e.tar.bz2
forums-9a52bd030189280f48a35d3b9e52f9d77071cb5e.tar.xz
forums-9a52bd030189280f48a35d3b9e52f9d77071cb5e.zip
[task/phpunit-xml] Use phpunit.xml for test suite
PHPBB3-9967
Diffstat (limited to 'tests/template')
-rw-r--r--tests/template/all_tests.php40
-rw-r--r--tests/template/template.php4
-rw-r--r--tests/template/templates/_dummy_include.php3
-rw-r--r--tests/template/templates/_dummy_include.php.inc3
-rw-r--r--tests/template/templates/includephp.html2
5 files changed, 5 insertions, 47 deletions
diff --git a/tests/template/all_tests.php b/tests/template/all_tests.php
deleted file mode 100644
index ea258c1680..0000000000
--- a/tests/template/all_tests.php
+++ /dev/null
@@ -1,40 +0,0 @@
-<?php
-/**
-*
-* @package testing
-* @copyright (c) 2008 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
-*
-*/
-
-if (!defined('PHPUnit_MAIN_METHOD'))
-{
- define('PHPUnit_MAIN_METHOD', 'phpbb_template_all_tests::main');
-}
-
-require_once 'test_framework/framework.php';
-require_once 'PHPUnit/TextUI/TestRunner.php';
-
-require_once 'template/template.php';
-
-class phpbb_template_all_tests
-{
- public static function main()
- {
- PHPUnit_TextUI_TestRunner::run(self::suite());
- }
-
- public static function suite()
- {
- $suite = new PHPUnit_Framework_TestSuite('phpBB Template Engine');
-
- $suite->addTestSuite('phpbb_template_template_test');
-
- return $suite;
- }
-}
-
-if (PHPUnit_MAIN_METHOD == 'phpbb_template_all_tests::main')
-{
- phpbb_template_all_tests::main();
-}
diff --git a/tests/template/template.php b/tests/template/template.php
index 0c2ca8a032..861adf63e8 100644
--- a/tests/template/template.php
+++ b/tests/template/template.php
@@ -7,9 +7,7 @@
*
*/
-require_once 'test_framework/framework.php';
-
-require_once '../phpBB/includes/template.php';
+require_once __DIR__ . '/../../phpBB/includes/template.php';
class phpbb_template_template_test extends phpbb_test_case
{
diff --git a/tests/template/templates/_dummy_include.php b/tests/template/templates/_dummy_include.php
deleted file mode 100644
index 1de5dddf59..0000000000
--- a/tests/template/templates/_dummy_include.php
+++ /dev/null
@@ -1,3 +0,0 @@
-<?php
-
-echo "testing included php";
diff --git a/tests/template/templates/_dummy_include.php.inc b/tests/template/templates/_dummy_include.php.inc
new file mode 100644
index 0000000000..aacb6b2045
--- /dev/null
+++ b/tests/template/templates/_dummy_include.php.inc
@@ -0,0 +1,3 @@
+<?php
+// extension is .php.inc so PHPUnit ignores it
+echo "testing included php";
diff --git a/tests/template/templates/includephp.html b/tests/template/templates/includephp.html
index 3e13fa33fa..117d4273f0 100644
--- a/tests/template/templates/includephp.html
+++ b/tests/template/templates/includephp.html
@@ -1 +1 @@
-<!-- INCLUDEPHP ../templates/_dummy_include.php -->
+<!-- INCLUDEPHP ../templates/_dummy_include.php.inc -->