mirror of
https://github.com/flarum/core.git
synced 2025-08-05 07:57:46 +02:00
fixed those exception handling tests
This commit is contained in:
@@ -13,9 +13,11 @@ namespace Tests\Flarum\Api\Handler;
|
||||
|
||||
use Exception;
|
||||
use Flarum\Api\ExceptionHandler\IlluminateValidationExceptionHandler;
|
||||
use Illuminate\Contracts\Validation\ValidationException;
|
||||
use Illuminate\Translation\{
|
||||
Translator, ArrayLoader
|
||||
};
|
||||
use Illuminate\Validation\ValidationException;
|
||||
use Illuminate\Validation\Factory;
|
||||
use Symfony\Component\Translation\Translator;
|
||||
use Tests\Test\TestCase;
|
||||
|
||||
class IlluminateValidationExceptionHandlerTest extends TestCase
|
||||
@@ -54,7 +56,7 @@ class IlluminateValidationExceptionHandlerTest extends TestCase
|
||||
|
||||
private function makeValidator($data = [], $rules = [])
|
||||
{
|
||||
$translator = new Translator('en');
|
||||
$translator = new Translator(new ArrayLoader(), 'en');
|
||||
$factory = new Factory($translator);
|
||||
|
||||
return $factory->make($data, $rules);
|
||||
|
@@ -12,9 +12,9 @@
|
||||
namespace Tests\Test;
|
||||
|
||||
use Mockery;
|
||||
use PHPUnit_Framework_TestCase;
|
||||
use PHPUnit\Framework\TestCase as Test;
|
||||
|
||||
abstract class TestCase extends PHPUnit_Framework_TestCase
|
||||
abstract class TestCase extends Test
|
||||
{
|
||||
public function setUp()
|
||||
{
|
||||
|
Reference in New Issue
Block a user