mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
fix ProphecyTrait in AbstractFilter to use it with each filter
This commit is contained in:
parent
3dabd031f4
commit
8bbca12487
@ -13,6 +13,7 @@ namespace Chill\MainBundle\Test\Export;
|
||||
|
||||
use Doctrine\ORM\QueryBuilder;
|
||||
use Exception;
|
||||
use Prophecy\PhpUnit\ProphecyTrait;
|
||||
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
|
||||
|
||||
use function count;
|
||||
@ -27,14 +28,16 @@ use function is_string;
|
||||
*/
|
||||
abstract class AbstractFilterTest extends KernelTestCase
|
||||
{
|
||||
use ProphecyTrait;
|
||||
|
||||
/**
|
||||
* @var \Prophecy\Prophet
|
||||
*/
|
||||
protected $prophet;
|
||||
private $prophet;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
$this->prepareProphet();
|
||||
$$this->prophet = $this->getProphet();
|
||||
}
|
||||
|
||||
public function dataProviderAlterQuery()
|
||||
|
@ -14,11 +14,9 @@ class EmergencyFilterTest extends AbstractFilterTest
|
||||
self::bootKernel();
|
||||
|
||||
// add a fake request with a default locale (used in translatable string)
|
||||
$prophet = new \Prophecy\Prophet();
|
||||
$request = $prophet->prophesize();
|
||||
$request = $this->prophesize();
|
||||
|
||||
$request->willExtend(\Symfony\Component\HttpFoundation\Request::class);
|
||||
|
||||
$request->getLocale()->willReturn('fr');
|
||||
|
||||
$this->filter = self::$container->get('chill.person.export.filter_emergency');
|
||||
|
Loading…
x
Reference in New Issue
Block a user