[ticket/690] Make tests compatible with latest version of phpunit & phpBB

B3P-690
This commit is contained in:
Marc Alexander
2021-08-27 22:20:51 +02:00
parent 7ee3bd1727
commit abf8a7bfcf
16 changed files with 120 additions and 43 deletions

View File

@@ -25,8 +25,13 @@ class phpbb_unit_functions_functions_test extends \board3\portal\tests\testframe
$this->language_file_loader = new \phpbb\language\language_file_loader($phpbb_root_path, 'php');
$this->language = new \phpbb\language\language($this->language_file_loader);
$user = $this->getMock('\phpbb\user', array('optionget'), array($this->language, '\phpbb\datetime'));
$cache = $this->getMock('\phpbb\cache\cache', array('obtain_word_list', 'sql_exists'));
$user = $this->getMockBuilder('\phpbb\user')
->setMethods(['optionget'])
->setConstructorArgs([$this->language, '\phpbb\datetime'])
->getMock();
$cache = $this->getMockBuilder('\phpbb\cache\driver\dummy')
->setMethods(['obtain_word_list', 'sql_exists'])
->getMock();
$cache->expects($this->any())
->method('obtain_word_list')
->with()