Skip to content

Commit c15050c

Browse files
committed
Fix tests
1 parent 6b301ec commit c15050c

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

tests/controller/main_controller_test.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class main_controller_test extends \phpbb_test_case
1717
*
1818
* @return array Array of test data
1919
*/
20-
public function display_data()
20+
public static function display_data(): array
2121
{
2222
return array(
2323
'A rule' => array(
@@ -73,12 +73,9 @@ public function test_display($status_code, $page_content, $rule_data)
7373
$rule_operator = $this->getMockBuilder('\phpbb\boardrules\operators\rule')
7474
->disableOriginalConstructor()
7575
->getMock();
76-
$rule_operator->expects(self::at(0))
76+
$rule_operator->expects(self::exactly(2))
7777
->method('get_rules')
78-
->willReturn(array());
79-
$rule_operator->expects(self::at(1))
80-
->method('get_rules')
81-
->willReturn([$entity]);
78+
->willReturnOnConsecutiveCalls(array(), [$entity]);
8279

8380
// Mock the controller helper and return render response object
8481
$controller_helper = $this->getMockBuilder('\phpbb\controller\helper')

tests/system/ext_test.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
use PHPUnit\Framework\MockObject\MockObject;
1414
use phpbb\notification\manager;
15-
use phpbb\finder;
15+
use phpbb\finder\finder;
1616
use phpbb\db\migrator;
1717
use Symfony\Component\DependencyInjection\ContainerInterface;
1818
use phpbb\boardrules\ext;

0 commit comments

Comments
 (0)