diff options
author | Nathan Guse <nathaniel.guse@gmail.com> | 2012-10-29 18:41:31 -0500 |
---|---|---|
committer | Nathan Guse <nathaniel.guse@gmail.com> | 2012-10-29 18:41:31 -0500 |
commit | ead1d92b22433d26aba1d3a1356797a9104d684b (patch) | |
tree | 0b79d165ea149abfaf77f8938479b19875670794 /tests/notification | |
parent | b1ba7b27ad611d674ac54f97ea602ea95c8955b0 (diff) | |
download | forums-ead1d92b22433d26aba1d3a1356797a9104d684b.tar forums-ead1d92b22433d26aba1d3a1356797a9104d684b.tar.gz forums-ead1d92b22433d26aba1d3a1356797a9104d684b.tar.bz2 forums-ead1d92b22433d26aba1d3a1356797a9104d684b.tar.xz forums-ead1d92b22433d26aba1d3a1356797a9104d684b.zip |
[ticket/11103] Handle the ext notification type better
We don't actually need to test the finder here, so don't copy the ext
directory over
PHPBB3-11103
Diffstat (limited to 'tests/notification')
-rw-r--r-- | tests/notification/notification.php | 43 |
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 |