diff options
author | Marc Alexander <admin@m-a-styles.de> | 2018-12-30 11:36:08 +0100 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2019-01-02 20:19:56 +0100 |
commit | c6cc6ba8d8f946eb60bb47c6ca26c49bb211e1bf (patch) | |
tree | d1cc56f7b2bf096dbd8f971b0bbbfe4b95fe445d /tests/console | |
parent | [ticket/14948] Require PHP 7.1 and update dependencies (diff) | |
download | phpbb-c6cc6ba8d8f946eb60bb47c6ca26c49bb211e1bf.tar.gz phpbb-c6cc6ba8d8f946eb60bb47c6ca26c49bb211e1bf.tar.bz2 phpbb-c6cc6ba8d8f946eb60bb47c6ca26c49bb211e1bf.zip |
[ticket/14948] Adjust calls for twig and phpunit updates
PHPBB3-14948
Diffstat (limited to 'tests/console')
-rw-r--r-- | tests/console/cache/purge_test.php | 9 | ||||
-rw-r--r-- | tests/console/config/config_test.php | 2 | ||||
-rw-r--r-- | tests/console/cron/cron_list_test.php | 2 | ||||
-rw-r--r-- | tests/console/cron/run_test.php | 2 | ||||
-rw-r--r-- | tests/console/thumbnail_test.php | 4 | ||||
-rw-r--r-- | tests/console/user/activate_test.php | 2 | ||||
-rw-r--r-- | tests/console/user/add_test.php | 5 | ||||
-rw-r--r-- | tests/console/user/base.php | 2 |
8 files changed, 14 insertions, 14 deletions
diff --git a/tests/console/cache/purge_test.php b/tests/console/cache/purge_test.php index 7a7e1dee5c..2bb4252c41 100644 --- a/tests/console/cache/purge_test.php +++ b/tests/console/cache/purge_test.php @@ -25,15 +25,12 @@ class phpbb_console_command_cache_purge_test extends phpbb_test_case protected $db; protected $config; - public function __construct() - { - $this->cache_dir = dirname(__FILE__) . '/tmp/cache/'; - } - - protected function setUp() + protected function setUp(): void { global $phpbb_root_path, $phpEx; + $this->cache_dir = dirname(__FILE__) . '/tmp/cache/'; + if (file_exists($this->cache_dir)) { // cache directory possibly left after aborted diff --git a/tests/console/config/config_test.php b/tests/console/config/config_test.php index 7f8b2efce2..65bfad4757 100644 --- a/tests/console/config/config_test.php +++ b/tests/console/config/config_test.php @@ -20,7 +20,7 @@ class phpbb_console_command_config_test extends phpbb_test_case protected $command_name; protected $user; - public function setUp() + public function setUp(): void { global $phpbb_root_path, $phpEx; diff --git a/tests/console/cron/cron_list_test.php b/tests/console/cron/cron_list_test.php index 931713cd3c..69ae53c128 100644 --- a/tests/console/cron/cron_list_test.php +++ b/tests/console/cron/cron_list_test.php @@ -30,7 +30,7 @@ class phpbb_console_command_cron_list_test extends phpbb_test_case protected $command_tester; - protected function setUp() + protected function setUp(): void { global $phpbb_root_path, $phpEx; diff --git a/tests/console/cron/run_test.php b/tests/console/cron/run_test.php index 81e4e69f39..fce913dde4 100644 --- a/tests/console/cron/run_test.php +++ b/tests/console/cron/run_test.php @@ -32,7 +32,7 @@ class phpbb_console_command_cron_run_test extends phpbb_database_test_case return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/config.xml'); } - public function setUp() + public function setUp(): void { global $db, $config, $phpbb_root_path, $phpEx; diff --git a/tests/console/thumbnail_test.php b/tests/console/thumbnail_test.php index dc2bf47899..b8a85c4f4f 100644 --- a/tests/console/thumbnail_test.php +++ b/tests/console/thumbnail_test.php @@ -32,7 +32,7 @@ class phpbb_console_command_thumbnail_test extends phpbb_database_test_case return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/thumbnail.xml'); } - public function setUp() + public function setUp(): void { global $config, $phpbb_root_path, $phpEx, $phpbb_filesystem; @@ -75,7 +75,7 @@ class phpbb_console_command_thumbnail_test extends phpbb_database_test_case copy(dirname(__FILE__) . '/fixtures/txt.txt', $this->phpbb_root_path . 'files/test_txt'); } - protected function tearDown() + protected function tearDown(): void { parent::tearDown(); diff --git a/tests/console/user/activate_test.php b/tests/console/user/activate_test.php index 1588a76e47..51e9754b59 100644 --- a/tests/console/user/activate_test.php +++ b/tests/console/user/activate_test.php @@ -21,7 +21,7 @@ class phpbb_console_user_activate_test extends phpbb_console_user_base { protected $notifications; - public function setUp() + public function setUp(): void { parent::setUp(); diff --git a/tests/console/user/add_test.php b/tests/console/user/add_test.php index bdfb8a8d2a..cc86cb27d3 100644 --- a/tests/console/user/add_test.php +++ b/tests/console/user/add_test.php @@ -61,7 +61,10 @@ class phpbb_console_user_add_test extends phpbb_console_user_base $output->writeln(print_r($response, true)); return $response; }; - $helper = $this->getMock('\Symfony\Component\Console\Helper\QuestionHelper', array('ask')); + $helper = $this->getMockBuilder('\Symfony\Component\Console\Helper\QuestionHelper') + ->setMethods(['ask']) + ->disableOriginalConstructor() + ->getMock(); $helper->expects($this->any()) ->method('ask') ->will($this->returnCallback($ask)); diff --git a/tests/console/user/base.php b/tests/console/user/base.php index 83fe226f24..0d425e0b61 100644 --- a/tests/console/user/base.php +++ b/tests/console/user/base.php @@ -30,7 +30,7 @@ abstract class phpbb_console_user_base extends phpbb_database_test_case return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/config.xml'); } - public function setUp() + public function setUp(): void { global $auth, $db, $cache, $config, $user, $phpbb_dispatcher, $phpbb_container, $phpbb_root_path, $phpEx; |