1
0
mirror of https://github.com/flarum/core.git synced 2025-08-02 14:37:49 +02:00

PHPUnit: Get rid of deprecated annotation

Refs #1795.
This commit is contained in:
Franz Liedke
2019-07-30 00:09:10 +02:00
parent c2586586c4
commit f357434a72
7 changed files with 35 additions and 15 deletions

View File

@@ -15,6 +15,7 @@ use Flarum\Api\Controller\CreateDiscussionController;
use Flarum\Discussion\Discussion;
use Flarum\User\User;
use Illuminate\Support\Arr;
use Illuminate\Validation\ValidationException;
class CreateDiscussionControllerTest extends ApiControllerTestCase
{
@@ -65,8 +66,6 @@ class CreateDiscussionControllerTest extends ApiControllerTestCase
/**
* @test
* @expectedException \Illuminate\Validation\ValidationException
* @expectedExceptionMessage The given data was invalid.
*/
public function cannot_create_discussion_without_content()
{
@@ -74,13 +73,14 @@ class CreateDiscussionControllerTest extends ApiControllerTestCase
$data = Arr::except($this->data, 'content');
$this->expectException(ValidationException::class);
$this->expectExceptionMessage('The given data was invalid.');
$this->callWith($data);
}
/**
* @test
* @expectedException \Illuminate\Validation\ValidationException
* @expectedExceptionMessage The given data was invalid.
*/
public function cannot_create_discussion_without_title()
{
@@ -88,6 +88,9 @@ class CreateDiscussionControllerTest extends ApiControllerTestCase
$data = Arr::except($this->data, 'title');
$this->expectException(ValidationException::class);
$this->expectExceptionMessage('The given data was invalid.');
$this->callWith($data);
}
}