1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-01-17 22:28:46 +01:00

[ticket/15369] Fix php_exporter tests

PHPBB3-15369
This commit is contained in:
Matt Friedman 2018-01-06 11:01:40 -08:00 committed by Marc Alexander
parent 2753f8ccc8
commit 90f8498a44
No known key found for this signature in database
GPG Key ID: 50E0D2423696F995

View File

@ -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);