aboutsummaryrefslogtreecommitdiffstats
path: root/tests/event
diff options
context:
space:
mode:
authorMatt Friedman <maf675@gmail.com>2018-01-06 11:01:40 -0800
committerMarc Alexander <admin@m-a-styles.de>2019-05-10 21:02:54 +0200
commit90f8498a4488e7f28ee7741cb9245ff232489127 (patch)
treea7eb99f12d2167af41e352b47e9df0a602e14e92 /tests/event
parent2753f8ccc893ee7b9d9c0b6f645f2e8b82ac8064 (diff)
downloadforums-90f8498a4488e7f28ee7741cb9245ff232489127.tar
forums-90f8498a4488e7f28ee7741cb9245ff232489127.tar.gz
forums-90f8498a4488e7f28ee7741cb9245ff232489127.tar.bz2
forums-90f8498a4488e7f28ee7741cb9245ff232489127.tar.xz
forums-90f8498a4488e7f28ee7741cb9245ff232489127.zip
[ticket/15369] Fix php_exporter tests
PHPBB3-15369
Diffstat (limited to 'tests/event')
-rw-r--r--tests/event/php_exporter_test.php20
1 files changed, 13 insertions, 7 deletions
diff --git a/tests/event/php_exporter_test.php b/tests/event/php_exporter_test.php
index 78beb9f372..5c9e20aa7d 100644
--- a/tests/event/php_exporter_test.php
+++ b/tests/event/php_exporter_test.php
@@ -122,7 +122,7 @@ class phpbb_event_php_exporter_test extends phpbb_test_case
static public function crawl_php_file_throws_data()
{
return array(
- array('missing_var.test', null),
+ array('missing_var.test', 2),
array('duplicate_event.test', 10),
);
}
@@ -132,7 +132,8 @@ class phpbb_event_php_exporter_test extends phpbb_test_case
*/
public function test_crawl_php_file_throws($file, $exception_code)
{
- $this->setExpectedException('LogicException', '', $exception_code);
+ $this->expectException('LogicException');
+ $this->expectExceptionCode($exception_code);
$this->exporter->crawl_php_file($file);
}
@@ -206,7 +207,8 @@ class phpbb_event_php_exporter_test extends phpbb_test_case
*/
public function test_validate_event_throws($event_name, $event, $exception_code)
{
- $this->setExpectedException('LogicException', '', $exception_code);
+ $this->expectException('LogicException');
+ $this->expectExceptionCode($exception_code);
$this->exporter->validate_event($event_name, $event);
}
@@ -461,7 +463,8 @@ class phpbb_event_php_exporter_test extends phpbb_test_case
*/
public function test_get_vars_from_array_throws($lines, $event_line, $exception_code)
{
- $this->setExpectedException('LogicException', '', $exception_code);
+ $this->expectException('LogicException');
+ $this->expectExceptionCode($exception_code);
$this->exporter->set_current_event('', $event_line);
$this->exporter->set_content($lines);
@@ -546,7 +549,8 @@ class phpbb_event_php_exporter_test extends phpbb_test_case
*/
public function test_get_vars_from_docblock_throws($lines, $event_line, $exception_code)
{
- $this->setExpectedException('LogicException', '', $exception_code);
+ $this->expectException('LogicException');
+ $this->expectExceptionCode($exception_code);
$this->exporter->set_current_event('', $event_line);
$this->exporter->set_content($lines);
@@ -649,7 +653,8 @@ class phpbb_event_php_exporter_test extends phpbb_test_case
*/
public function test_find_since_throws($lines, $event_line, $exception_code)
{
- $this->setExpectedException('LogicException', '', $exception_code);
+ $this->expectException('LogicException');
+ $this->expectExceptionCode($exception_code);
$this->exporter->set_current_event('', $event_line);
$this->exporter->set_content($lines);
@@ -750,7 +755,8 @@ class phpbb_event_php_exporter_test extends phpbb_test_case
*/
public function test_find_description_throws($lines, $event_line, $exception_code)
{
- $this->setExpectedException('LogicException', '', $exception_code);
+ $this->expectException('LogicException');
+ $this->expectExceptionCode($exception_code);
$this->exporter->set_current_event('', $event_line);
$this->exporter->set_content($lines);