Skip to content

Commit 682a4ed

Browse files
committed
Remove deprecated phpunit code
1 parent a6aef4a commit 682a4ed

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

tests/controller/add_prefix_test.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public function test_add_prefix($prefix, $submit, $valid_form)
5353

5454
if (!$valid_form)
5555
{
56-
$this->expectException(\PHPUnit\Framework\Error\Warning::class);
56+
$this->expectException(\PHPUnit\Framework\Exception::class);
5757
}
5858
else
5959
{

tests/controller/delete_prefix_test.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public function test_delete_prefix($prefix_id, $confirm)
6363
->will(self::throwException(new \OutOfBoundsException()));
6464
$this->log->expects(self::never())
6565
->method('add');
66-
$this->expectException(\PHPUnit\Framework\Error\Warning::class);
66+
$this->expectException(\PHPUnit\Framework\Exception::class);
6767
}
6868
else
6969
{
@@ -79,7 +79,7 @@ public function test_delete_prefix($prefix_id, $confirm)
7979
$this->db->expects(static::once())
8080
->method('sql_fetchrow')
8181
->willReturn(['forum_name' => 'Test Forum']);
82-
$this->expectException(\PHPUnit\Framework\Error\Notice::class);
82+
$this->expectException(\PHPUnit\Framework\Exception::class);
8383
}
8484

8585
$this->controller->delete_prefix($prefix_id);

tests/controller/edit_prefix_test.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public function test_edit_prefix($prefix_id, $valid_form, $is_ajax)
5555
->method('get_prefix');
5656
$this->manager->expects(self::never())
5757
->method('update_prefix');
58-
$this->expectException(\PHPUnit\Framework\Error\Warning::class);
58+
$this->expectException(\PHPUnit\Framework\Exception::class);
5959
}
6060
else if ($prefix_id === 0)
6161
{
@@ -66,7 +66,7 @@ public function test_edit_prefix($prefix_id, $valid_form, $is_ajax)
6666
$this->manager->expects(self::once())
6767
->method('update_prefix')
6868
->will(self::throwException(new \OutOfBoundsException));
69-
$this->expectException(\PHPUnit\Framework\Error\Warning::class);
69+
$this->expectException(\PHPUnit\Framework\Exception::class);
7070
}
7171
else
7272
{

tests/controller/move_prefix_test.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,13 @@ public function test_move_prefix($prefix_id, $direction, $valid_form, $is_ajax)
5858
if (!$valid_form)
5959
{
6060
$prefix_id = 0;
61-
$this->expectException(\PHPUnit\Framework\Error\Warning::class);
61+
$this->expectException(\PHPUnit\Framework\Exception::class);
6262
$this->manager->expects(static::never())
6363
->method('move_prefix');
6464
}
6565
else if ($prefix_id === 0)
6666
{
67-
$this->expectException(\PHPUnit\Framework\Error\Warning::class);
67+
$this->expectException(\PHPUnit\Framework\Exception::class);
6868
$this->manager->expects(static::once())
6969
->method('move_prefix')
7070
->with(static::equalTo(0), static::stringContains($direction))

0 commit comments

Comments
 (0)