aboutsummaryrefslogtreecommitdiffstats
path: root/tests/notification/notification.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/notification/notification.php')
-rw-r--r--tests/notification/notification.php43
1 files changed, 2 insertions, 41 deletions
diff --git a/tests/notification/notification.php b/tests/notification/notification.php
index 4bacc2a954..9c88ad892e 100644
--- a/tests/notification/notification.php
+++ b/tests/notification/notification.php
@@ -10,52 +10,12 @@
class phpbb_notification_test extends phpbb_database_test_case
{
protected $notifications;
- static private $copied_files = array();
- static private $helper;
public function getDataSet()
{
return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/notification.xml');
}
- /**
- * This should only be called once before the tests are run.
- * This is used to copy the extensions to the phpBB install
- */
- static public function setUpBeforeClass()
- {
- global $phpbb_root_path;
-
- parent::setUpBeforeClass();
-
- self::$helper = new phpbb_test_case_helpers(self);
-
- // First, move any extensions setup on the board to a temp directory
- self::$copied_files = self::$helper->copy_dir($phpbb_root_path . 'ext/', $phpbb_root_path . 'store/temp_ext/');
-
- // Then empty the ext/ directory on the board (for accurate test cases)
- self::$helper->empty_dir($phpbb_root_path . 'ext/');
-
- // Copy our ext/ files from the test case to the board
- self::$copied_files = array_merge(self::$copied_files, self::$helper->copy_dir(dirname(__FILE__) . '/ext/', $phpbb_root_path . 'ext/'));
- }
-
- /**
- * This should only be called once after the tests are run.
- * This is used to remove the files copied to the phpBB install
- */
- static public function tearDownAfterClass()
- {
- global $phpbb_root_path;
-
- // Copy back the board installed extensions from the temp directory
- self::$helper->copy_dir($phpbb_root_path . 'store/temp_ext/', $phpbb_root_path . 'ext/');
-
- self::$copied_files[] = $phpbb_root_path . 'store/temp_ext/';
-
- // Remove all of the files we copied around (from board ext -> temp_ext, from test ext -> board ext)
- self::$helper->remove_files(self::$copied_files);
- }
protected function setUp()
{
@@ -68,6 +28,8 @@ class phpbb_notification_test extends phpbb_database_test_case
include($phpbb_root_path . 'includes/functions.' . $phpEx);
}
+ include_once(__DIR__ . '/ext/test/notification/type/test.' . $phpEx);
+
$db = $this->new_dbal();
$config = new phpbb_config(array(
'allow_privmsg' => true,
@@ -111,7 +73,6 @@ class phpbb_notification_test extends phpbb_database_test_case
$this->assertArrayHasKey('phpbb_notification_type_topic', $subscription_types['NOTIFICATION_GROUP_POSTING']);
$this->assertArrayHasKey('phpbb_notification_type_pm', $subscription_types['NOTIFICATION_GROUP_MISCELLANEOUS']);
- $this->assertArrayHasKey('phpbb_ext_test_notification_type_test', $subscription_types['NOTIFICATION_GROUP_MISCELLANEOUS']);
//get_subscription_types
//get_subscription_methods