aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMatt Friedman <maf675@gmail.com>2018-01-06 10:37:39 -0800
committerMarc Alexander <admin@m-a-styles.de>2019-05-10 21:02:43 +0200
commit2753f8ccc893ee7b9d9c0b6f645f2e8b82ac8064 (patch)
tree67ba511a0dd9b9a8439ac78da7dbf8c9c7fbdaf2 /tests
parent18d4b7f358786137f838272fc9198203ed47daf7 (diff)
downloadforums-2753f8ccc893ee7b9d9c0b6f645f2e8b82ac8064.tar
forums-2753f8ccc893ee7b9d9c0b6f645f2e8b82ac8064.tar.gz
forums-2753f8ccc893ee7b9d9c0b6f645f2e8b82ac8064.tar.bz2
forums-2753f8ccc893ee7b9d9c0b6f645f2e8b82ac8064.tar.xz
forums-2753f8ccc893ee7b9d9c0b6f645f2e8b82ac8064.zip
[ticket/15369] Fix tests
PHPBB3-15369
Diffstat (limited to 'tests')
-rw-r--r--tests/feed/attachments_base_test.php2
-rw-r--r--tests/test_framework/phpbb_test_case_helpers.php7
2 files changed, 7 insertions, 2 deletions
diff --git a/tests/feed/attachments_base_test.php b/tests/feed/attachments_base_test.php
index e6864eff4f..3798056f10 100644
--- a/tests/feed/attachments_base_test.php
+++ b/tests/feed/attachments_base_test.php
@@ -36,7 +36,7 @@ class phpbb_feed_attachments_base_test extends phpbb_database_test_case
new phpbb_mock_request()
),
$this->filesystem,
- $this->getMock('\phpbb\request\request'),
+ $this->createMock('\phpbb\request\request'),
$phpbb_root_path,
'php'
);
diff --git a/tests/test_framework/phpbb_test_case_helpers.php b/tests/test_framework/phpbb_test_case_helpers.php
index d12572faf0..807a64d810 100644
--- a/tests/test_framework/phpbb_test_case_helpers.php
+++ b/tests/test_framework/phpbb_test_case_helpers.php
@@ -95,7 +95,12 @@ class phpbb_test_case_helpers
break;
}
$this->expectedTriggerError = true;
- $this->test_case->setExpectedException($exceptionName, (string) $message, $errno);
+ $this->test_case->expectException($exceptionName);
+ $this->test_case->expectExceptionCode($errno);
+ if ($message)
+ {
+ $this->test_case->expectExceptionMessage((string) $message);
+ }
}
public function makedirs($path)