fix: Fix return types in tests.

This commit is contained in:
Pol Dellaiera 2021-12-21 15:19:36 +01:00
parent 58a13d932f
commit 70ca203e23
No known key found for this signature in database
GPG Key ID: D476DFE9C67467CA
67 changed files with 76 additions and 76 deletions

View File

@ -26,7 +26,7 @@ final class ActivityReasonAggregatorTest extends AbstractAggregatorTest
*/ */
private $aggregator; private $aggregator;
public function setUp(): void protected function setUp(): void
{ {
self::bootKernel(); self::bootKernel();

View File

@ -26,7 +26,7 @@ final class ActivityTypeAggregatorTest extends AbstractAggregatorTest
*/ */
private $aggregator; private $aggregator;
public function setUp(): void protected function setUp(): void
{ {
self::bootKernel(); self::bootKernel();

View File

@ -26,7 +26,7 @@ final class ActivityUserAggregatorTest extends AbstractAggregatorTest
*/ */
private $aggregator; private $aggregator;
public function setUp(): void protected function setUp(): void
{ {
self::bootKernel(); self::bootKernel();

View File

@ -24,7 +24,7 @@ final class CountActivityTest extends AbstractExportTest
*/ */
private $export; private $export;
public function setUp(): void protected function setUp(): void
{ {
self::bootKernel(); self::bootKernel();

View File

@ -24,7 +24,7 @@ final class ListActivityTest extends AbstractExportTest
*/ */
private $export; private $export;
public function setUp(): void protected function setUp(): void
{ {
self::bootKernel(); self::bootKernel();

View File

@ -26,7 +26,7 @@ final class StatActivityDurationSumTest extends AbstractExportTest
*/ */
private $export; private $export;
public function setUp(): void protected function setUp(): void
{ {
self::bootKernel(); self::bootKernel();

View File

@ -25,7 +25,7 @@ final class ActivityReasonFilterTest extends AbstractFilterTest
*/ */
private $filter; private $filter;
public function setUp(): void protected function setUp(): void
{ {
self::bootKernel(); self::bootKernel();

View File

@ -26,7 +26,7 @@ final class PersonHavingActivityBetweenDateFilterTest extends AbstractFilterTest
*/ */
private $filter; private $filter;
public function setUp(): void protected function setUp(): void
{ {
self::bootKernel(); self::bootKernel();

View File

@ -45,7 +45,7 @@ final class ActivityTypeTest extends KernelTestCase
*/ */
protected $user; protected $user;
public function setUp(): void protected function setUp(): void
{ {
self::bootKernel(); self::bootKernel();

View File

@ -29,7 +29,7 @@ final class TranslatableActivityReasonTest extends TypeTestCase
*/ */
private static $prophet; private static $prophet;
public function setUp(): void protected function setUp(): void
{ {
parent::setUp(); parent::setUp();
} }

View File

@ -31,7 +31,7 @@ final class TranslatableActivityTypeTest extends KernelTestCase
*/ */
protected $container; protected $container;
public function setUp(): void protected function setUp(): void
{ {
self::bootKernel(); self::bootKernel();

View File

@ -44,7 +44,7 @@ final class ActivityVoterTest extends KernelTestCase
*/ */
protected $voter; protected $voter;
public function setUp(): void protected function setUp(): void
{ {
self::bootKernel(); self::bootKernel();
$this->voter = self::$kernel->getContainer() $this->voter = self::$kernel->getContainer()

View File

@ -26,7 +26,7 @@ final class AsideActivityControllerTest extends WebTestCase
{ {
use PrepareClientTrait; use PrepareClientTrait;
public function setUp(): void protected function setUp(): void
{ {
parent::setUp(); parent::setUp();
self::bootKernel(); self::bootKernel();

View File

@ -26,7 +26,7 @@ final class CalendarControllerTest extends WebTestCase
/** /**
* Setup before each test method (see phpunit doc). * Setup before each test method (see phpunit doc).
*/ */
public function setUp(): void protected function setUp(): void
{ {
self::bootKernel(); self::bootKernel();
$this->client = self::createClient([], [ $this->client = self::createClient([], [

View File

@ -37,7 +37,7 @@ final class CustomFieldsChoiceTest extends KernelTestCase
*/ */
private $cfProvider; private $cfProvider;
public function setUp(): void protected function setUp(): void
{ {
self::bootKernel(); self::bootKernel();
@ -46,7 +46,7 @@ final class CustomFieldsChoiceTest extends KernelTestCase
$this->cfChoice = $this->cfProvider->getCustomFieldByType('choice'); $this->cfChoice = $this->cfProvider->getCustomFieldByType('choice');
} }
public function tearDown() protected function tearDown(): void
{ {
parent::tearDown(); parent::tearDown();
} }

View File

@ -34,7 +34,7 @@ final class CustomFieldsNumberTest extends \Symfony\Bundle\FrameworkBundle\Test\
*/ */
private $formBuilder; private $formBuilder;
public function setUp(): void protected function setUp(): void
{ {
self::bootKernel(); self::bootKernel();

View File

@ -28,7 +28,7 @@ final class CustomFieldsTextTest extends WebTestCase
*/ */
private $customFieldProvider; private $customFieldProvider;
public function setUp(): void protected function setUp(): void
{ {
self::bootKernel(); self::bootKernel();
$this->customFieldProvider = self::$kernel->getContainer() $this->customFieldProvider = self::$kernel->getContainer()

View File

@ -27,7 +27,7 @@ final class PostTextIntegerExtensionTest extends KernelTestCase
*/ */
private $formBuilder; private $formBuilder;
public function setUp(): void protected function setUp(): void
{ {
self::bootKernel(); self::bootKernel();

View File

@ -27,7 +27,7 @@ final class PostTextNumberExtensionTest extends KernelTestCase
*/ */
private $formBuilder; private $formBuilder;
public function setUp(): void protected function setUp(): void
{ {
self::bootKernel(); self::bootKernel();

View File

@ -33,7 +33,7 @@ final class CustomFieldsHelperTest extends KernelTestCase
*/ */
private $randomCFText; private $randomCFText;
public function setUp(): void protected function setUp(): void
{ {
self::bootKernel(); self::bootKernel();

View File

@ -34,7 +34,7 @@ final class CustomFieldRenderingTwigTest extends KernelTestCase
*/ */
private $cfRendering; private $cfRendering;
public function setUp(): void protected function setUp(): void
{ {
self::bootKernel(); self::bootKernel();
$this->cfRendering = self::$kernel->getContainer() $this->cfRendering = self::$kernel->getContainer()

View File

@ -36,7 +36,7 @@ final class CustomFieldsGroupRenderingTwigTest extends KernelTestCase
*/ */
private $cfRendering; private $cfRendering;
public function setUp(): void protected function setUp(): void
{ {
self::bootKernel(); self::bootKernel();
$this->cfRendering = self::$kernel->getContainer() $this->cfRendering = self::$kernel->getContainer()

View File

@ -44,7 +44,7 @@ final class ParticipationControllerTest extends WebTestCase
*/ */
private $personsIdsCache = []; private $personsIdsCache = [];
public function setUp(): void protected function setUp(): void
{ {
self::bootKernel(); self::bootKernel();

View File

@ -68,7 +68,7 @@ final class EventSearchTest extends WebTestCase
*/ */
protected $prophet; protected $prophet;
public function setUp(): void protected function setUp(): void
{ {
self::bootKernel(); self::bootKernel();
/** @var \Symfony\Component\HttpKernel\KernelInterface $kernel */ /** @var \Symfony\Component\HttpKernel\KernelInterface $kernel */
@ -96,7 +96,7 @@ final class EventSearchTest extends WebTestCase
$this->createEvents(); $this->createEvents();
} }
public function tearDown() protected function tearDown(): void
{ {
foreach ($this->events as $event) { foreach ($this->events as $event) {
$this->entityManager->createQuery('DELETE FROM ChillEventBundle:Event e WHERE e.id = :event_id') $this->entityManager->createQuery('DELETE FROM ChillEventBundle:Event e WHERE e.id = :event_id')

View File

@ -32,7 +32,7 @@ abstract class AbstractFilterTest extends KernelTestCase
*/ */
protected $prophet; protected $prophet;
public function setUp(): void protected function setUp(): void
{ {
$this->prepareProphet(); $this->prepareProphet();
} }

View File

@ -23,7 +23,7 @@ final class ParentRoleHelperTest extends KernelTestCase
{ {
private ParentRoleHelper $parentRoleHelper; private ParentRoleHelper $parentRoleHelper;
public function setUp(): void protected function setUp(): void
{ {
self::bootKernel(); self::bootKernel();
$this->parentRoleHelper = self::$container->get(ParentRoleHelper::class); $this->parentRoleHelper = self::$container->get(ParentRoleHelper::class);

View File

@ -26,7 +26,7 @@ final class AddressControllerTest extends \Symfony\Bundle\FrameworkBundle\Test\W
private KernelBrowser $client; private KernelBrowser $client;
public function setUp(): void protected function setUp(): void
{ {
self::bootKernel(); self::bootKernel();
$this->client = $this->getClientAuthenticated(); $this->client = $this->getClientAuthenticated();

View File

@ -26,7 +26,7 @@ final class UserControllerTest extends WebTestCase
private array $toDelete = []; private array $toDelete = [];
public function setUp(): void protected function setUp(): void
{ {
self::bootKernel(); self::bootKernel();

View File

@ -42,14 +42,14 @@ final class ExportManagerTest extends KernelTestCase
*/ */
private $prophet; private $prophet;
public function setUp(): void protected function setUp(): void
{ {
self::bootKernel(); self::bootKernel();
$this->prophet = new \Prophecy\Prophet(); $this->prophet = new \Prophecy\Prophet();
} }
public function tearDown() protected function tearDown(): void
{ {
$this->prophet->checkPredictions(); $this->prophet->checkPredictions();
} }

View File

@ -27,7 +27,7 @@ final class PageTest extends KernelTestCase
protected $prophet; protected $prophet;
public function setUp(): void protected function setUp(): void
{ {
$this->prophet = new \Prophecy\Prophet(); $this->prophet = new \Prophecy\Prophet();
} }

View File

@ -28,7 +28,7 @@ final class PaginatorTest extends KernelTestCase
protected $prophet; protected $prophet;
public function setUp(): void protected function setUp(): void
{ {
$this->prophet = new \Prophecy\Prophet(); $this->prophet = new \Prophecy\Prophet();
} }

View File

@ -23,7 +23,7 @@ final class RouteLoaderTest extends KernelTestCase
{ {
private $router; private $router;
public function setUp(): void protected function setUp(): void
{ {
self::bootKernel(); self::bootKernel();
$this->router = self::$kernel->getContainer()->get('router'); $this->router = self::$kernel->getContainer()->get('router');

View File

@ -24,7 +24,7 @@ final class AbstractSearchTest extends \PHPUnit\Framework\TestCase
*/ */
private $stub; private $stub;
public function setUp(): void protected function setUp(): void
{ {
$this->stub = $this->getMockForAbstractClass('Chill\MainBundle\Search\AbstractSearch'); $this->stub = $this->getMockForAbstractClass('Chill\MainBundle\Search\AbstractSearch');
} }

View File

@ -26,7 +26,7 @@ final class SearchProviderTest extends TestCase
*/ */
private $search; private $search;
public function setUp(): void protected function setUp(): void
{ {
$this->search = new SearchProvider(); $this->search = new SearchProvider();

View File

@ -38,7 +38,7 @@ final class AuthorizationHelperTest extends KernelTestCase
use PrepareUserTrait; use PrepareUserTrait;
use ProphecyTrait; use ProphecyTrait;
public function setUp(): void protected function setUp(): void
{ {
self::bootKernel(); self::bootKernel();
} }

View File

@ -25,7 +25,7 @@ final class TokenManagerTest extends KernelTestCase
{ {
protected $tokenManager; protected $tokenManager;
public function setUp(): void protected function setUp(): void
{ {
self::bootKernel(); self::bootKernel();

View File

@ -25,7 +25,7 @@ final class DefaultScopeResolverTest extends TestCase
{ {
private DefaultScopeResolver $scopeResolver; private DefaultScopeResolver $scopeResolver;
public function setUp(): void protected function setUp(): void
{ {
$this->scopeResolver = new DefaultScopeResolver(); $this->scopeResolver = new DefaultScopeResolver();
} }

View File

@ -26,7 +26,7 @@ final class ScopeResolverDispatcherTest extends TestCase
{ {
private ScopeResolverDispatcher $scopeResolverDispatcher; private ScopeResolverDispatcher $scopeResolverDispatcher;
public function setUp(): void protected function setUp(): void
{ {
$this->scopeResolverDispatcher = new ScopeResolverDispatcher([new DefaultScopeResolver()]); $this->scopeResolverDispatcher = new ScopeResolverDispatcher([new DefaultScopeResolver()]);
} }

View File

@ -30,7 +30,7 @@ final class DateNormalizerTest extends KernelTestCase
{ {
private Prophet $prophet; private Prophet $prophet;
public function setUp(): void protected function setUp(): void
{ {
$this->prophet = new Prophet(); $this->prophet = new Prophet();
} }

View File

@ -32,7 +32,7 @@ final class MenuComposerTest extends KernelTestCase
*/ */
private $menuComposer; private $menuComposer;
public function setUp(): void protected function setUp(): void
{ {
self::bootKernel(['environment' => 'test']); self::bootKernel(['environment' => 'test']);
$this->menuComposer = self::$container $this->menuComposer = self::$container

View File

@ -35,7 +35,7 @@ final class AccompanyingPeriodConfidentialTest extends WebTestCase
/** /**
* Setup before each test method (see phpunit doc). * Setup before each test method (see phpunit doc).
*/ */
public function setUp(): void protected function setUp(): void
{ {
$this->client = self::createClient([], [ $this->client = self::createClient([], [
'PHP_AUTH_USER' => 'fred', 'PHP_AUTH_USER' => 'fred',

View File

@ -59,7 +59,7 @@ final class AccompanyingCourseApiControllerTest extends WebTestCase
/** /**
* Setup before each test method (see phpunit doc). * Setup before each test method (see phpunit doc).
*/ */
public function setUp(): void protected function setUp(): void
{ {
$this->client = self::createClient([], [ $this->client = self::createClient([], [
'PHP_AUTH_USER' => 'center a_social', 'PHP_AUTH_USER' => 'center a_social',

View File

@ -32,7 +32,7 @@ final class AccompanyingCourseControllerTest extends WebTestCase
{ {
use PrepareClientTrait; use PrepareClientTrait;
public function setUp(): void protected function setUp(): void
{ {
parent::setUp(); parent::setUp();
self::bootKernel(); self::bootKernel();

View File

@ -64,7 +64,7 @@ final class AccompanyingPeriodControllerTest extends WebTestCase
/** /**
* Setup before each test method (see phpunit doc). * Setup before each test method (see phpunit doc).
*/ */
public function setUp(): void protected function setUp(): void
{ {
$this->client = self::createClient([], [ $this->client = self::createClient([], [
'PHP_AUTH_USER' => 'center a_social', 'PHP_AUTH_USER' => 'center a_social',
@ -87,7 +87,7 @@ final class AccompanyingPeriodControllerTest extends WebTestCase
/** /**
* TearDown after each test method (see phpunit doc). * TearDown after each test method (see phpunit doc).
*/ */
public function tearDown() protected function tearDown(): void
{ {
self::$em->refresh($this->person); self::$em->refresh($this->person);
self::$em->remove($this->person); self::$em->remove($this->person);

View File

@ -63,7 +63,7 @@ final class PersonAddressControllerTest extends WebTestCase
/** /**
* Prepare client and create a random person. * Prepare client and create a random person.
*/ */
public function setUp(): void protected function setUp(): void
{ {
self::bootKernel(); self::bootKernel();

View File

@ -67,7 +67,7 @@ final class PersonControllerCreateTest extends WebTestCase
$em->flush(); $em->flush();
} }
public function setUp(): void protected function setUp(): void
{ {
$this->client = $this->getClientAuthenticated(); $this->client = $this->getClientAuthenticated();
} }

View File

@ -51,7 +51,7 @@ final class PersonControllerUpdateTest extends WebTestCase
/** /**
* Prepare client and create a random person. * Prepare client and create a random person.
*/ */
public function setUp(): void protected function setUp(): void
{ {
self::bootKernel(); self::bootKernel();
@ -76,7 +76,7 @@ final class PersonControllerUpdateTest extends WebTestCase
$this->client = $this->getClientAuthenticated(); $this->client = $this->getClientAuthenticated();
} }
public function tearDown() protected function tearDown(): void
{ {
$this->refreshPerson(); $this->refreshPerson();
$this->em->remove($this->person); $this->em->remove($this->person);

View File

@ -50,7 +50,7 @@ final class PersonControllerUpdateWithHiddenFieldsTest extends WebTestCase
/** /**
* Prepare client and create a random person. * Prepare client and create a random person.
*/ */
public function setUp(): void protected function setUp(): void
{ {
self::bootKernel(['environment' => 'test_with_hidden_fields']); self::bootKernel(['environment' => 'test_with_hidden_fields']);
@ -83,7 +83,7 @@ final class PersonControllerUpdateWithHiddenFieldsTest extends WebTestCase
); );
} }
public function tearDown() protected function tearDown(): void
{ {
$this->refreshPerson(); $this->refreshPerson();
$this->em->remove($this->person); $this->em->remove($this->person);

View File

@ -35,7 +35,7 @@ final class PersonControllerViewTest extends WebTestCase
*/ */
private $viewUrl; private $viewUrl;
public function setUp(): void protected function setUp(): void
{ {
self::bootKernel(); self::bootKernel();
@ -57,7 +57,7 @@ final class PersonControllerViewTest extends WebTestCase
$this->viewUrl = '/en/person/' . $this->person->getId() . '/general'; $this->viewUrl = '/en/person/' . $this->person->getId() . '/general';
} }
public function tearDown() protected function tearDown(): void
{ {
$this->refreshPerson(); $this->refreshPerson();
$this->em->remove($this->person); $this->em->remove($this->person);

View File

@ -35,7 +35,7 @@ final class PersonControllerViewWithHiddenFieldsTest extends WebTestCase
*/ */
private $viewUrl; private $viewUrl;
public function setUp(): void protected function setUp(): void
{ {
self::bootKernel(['environment' => 'test_with_hidden_fields']); self::bootKernel(['environment' => 'test_with_hidden_fields']);
@ -57,7 +57,7 @@ final class PersonControllerViewWithHiddenFieldsTest extends WebTestCase
$this->viewUrl = '/en/person/' . $this->person->getId() . '/general'; $this->viewUrl = '/en/person/' . $this->person->getId() . '/general';
} }
public function tearDown() protected function tearDown(): void
{ {
$this->refreshPerson(); $this->refreshPerson();
$this->em->remove($this->person); $this->em->remove($this->person);

View File

@ -20,7 +20,7 @@ use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
*/ */
final class PersonDuplicateControllerViewTest extends WebTestCase final class PersonDuplicateControllerViewTest extends WebTestCase
{ {
public function setUp(): void protected function setUp(): void
{ {
self::bootKernel(); self::bootKernel();

View File

@ -39,7 +39,7 @@ final class RelationshipApiControllerTest extends WebTestCase
*/ */
private ?array $relations = null; private ?array $relations = null;
public function setUp(): void protected function setUp(): void
{ {
self::bootKernel(); self::bootKernel();
$this->client = $this->getClientAuthenticated(); $this->client = $this->getClientAuthenticated();

View File

@ -26,7 +26,7 @@ final class SocialIssueApiControllerTest extends WebTestCase
{ {
use PrepareClientTrait; use PrepareClientTrait;
public function setUp(): void protected function setUp(): void
{ {
parent::setUp(); parent::setUp();

View File

@ -25,7 +25,7 @@ final class AgeAggregatorTest extends AbstractAggregatorTest
*/ */
private $aggregator; private $aggregator;
public function setUp(): void protected function setUp(): void
{ {
self::bootKernel(); self::bootKernel();

View File

@ -24,7 +24,7 @@ final class GenderAggregatorTest extends AbstractAggregatorTest
*/ */
private $aggregator; private $aggregator;
public function setUp(): void protected function setUp(): void
{ {
self::bootKernel(); self::bootKernel();

View File

@ -24,7 +24,7 @@ final class NationalityAggregatorTest extends AbstractAggregatorTest
*/ */
private $aggregator; private $aggregator;
public function setUp(): void protected function setUp(): void
{ {
self::bootKernel(); self::bootKernel();

View File

@ -26,7 +26,7 @@ final class CountPersonTest extends AbstractExportTest
*/ */
private $export; private $export;
public function setUp(): void protected function setUp(): void
{ {
self::bootKernel(); self::bootKernel();

View File

@ -28,7 +28,7 @@ final class ListPersonTest extends AbstractExportTest
*/ */
private $export; private $export;
public function setUp(): void protected function setUp(): void
{ {
self::bootKernel(); self::bootKernel();

View File

@ -26,7 +26,7 @@ final class AccompanyingPeriodFilterTest extends AbstractFilterTest
*/ */
private $filter; private $filter;
public function setUp(): void protected function setUp(): void
{ {
self::bootKernel(); self::bootKernel();

View File

@ -25,7 +25,7 @@ final class BirthdayFilterTest extends AbstractFilterTest
*/ */
private $filter; private $filter;
public function setUp(): void protected function setUp(): void
{ {
self::bootKernel(); self::bootKernel();

View File

@ -25,7 +25,7 @@ final class GenderFilterTest extends AbstractFilterTest
*/ */
private $filter; private $filter;
public function setUp(): void protected function setUp(): void
{ {
self::bootKernel(); self::bootKernel();

View File

@ -32,7 +32,7 @@ final class PickPersonTypeTest extends KernelTestCase
*/ */
protected $user; protected $user;
public function setUp(): void protected function setUp(): void
{ {
self::bootKernel(); self::bootKernel();

View File

@ -42,7 +42,7 @@ final class PersonVoterTest extends KernelTestCase
*/ */
protected $voter; protected $voter;
public function setUp(): void protected function setUp(): void
{ {
self::bootKernel(); self::bootKernel();
$this->voter = self::$container $this->voter = self::$container

View File

@ -38,7 +38,7 @@ final class ReportControllerNextTest extends WebTestCase
*/ */
protected $person; protected $person;
public function setUp(): void protected function setUp(): void
{ {
self::bootKernel(); self::bootKernel();
// get person from fixture // get person from fixture

View File

@ -98,7 +98,7 @@ final class ReportControllerTest extends WebTestCase
->findOneBy(['username' => 'center a_social']); ->findOneBy(['username' => 'center a_social']);
} }
public function setUp(): void protected function setUp(): void
{ {
self::$client = self::createClient([], [ self::$client = self::createClient([], [
'PHP_AUTH_USER' => 'center a_social', 'PHP_AUTH_USER' => 'center a_social',

View File

@ -45,7 +45,7 @@ final class ReportVoterTest extends KernelTestCase
{ {
} }
public function setUp(): void protected function setUp(): void
{ {
self::bootKernel(); self::bootKernel();
$this->voter = self::$kernel->getContainer() $this->voter = self::$kernel->getContainer()

View File

@ -45,7 +45,7 @@ final class TimelineProviderTest extends WebTestCase
/** /**
* Create a person with a report associated with the person. * Create a person with a report associated with the person.
*/ */
public function setUp(): void protected function setUp(): void
{ {
self::bootKernel(); self::bootKernel();
@ -86,7 +86,7 @@ final class TimelineProviderTest extends WebTestCase
self::$em->flush(); self::$em->flush();
} }
public function tearDown() protected function tearDown(): void
{ {
//static::$em->refresh($this->person); //static::$em->refresh($this->person);
//static::$em->refresh($this->report); //static::$em->refresh($this->report);