mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-28 17:44:58 +00:00
This change is made to comply with the new Symfony standards and to avoid deprecation warnings for future versions. The update touches various functionalities, including retrieving EntityManagerInterface instance and various service classes within the test files.
46 lines
1.0 KiB
PHP
46 lines
1.0 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
/*
|
|
* Chill is a software for social workers
|
|
*
|
|
* For the full copyright and license information, please view
|
|
* the LICENSE file that was distributed with this source code.
|
|
*/
|
|
|
|
namespace Chill\PersonBundle\Tests\Repository;
|
|
|
|
use Chill\MainBundle\Repository\UserRepository;
|
|
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
|
|
|
|
/**
|
|
* @internal
|
|
*
|
|
* @coversNothing
|
|
*/
|
|
class UserRepositoryTest extends KernelTestCase
|
|
{
|
|
private UserRepository $userRepository;
|
|
|
|
protected function setUp(): void
|
|
{
|
|
parent::setUp();
|
|
self::bootKernel();
|
|
$this->userRepository = self::getContainer()->get(UserRepository::class);
|
|
}
|
|
|
|
public function testFindAllAsArray(): void
|
|
{
|
|
$userIterator = $this->userRepository->findAllAsArray('fr');
|
|
|
|
self::assertIsIterable($userIterator);
|
|
$i = 0;
|
|
foreach ($userIterator as $u) {
|
|
self::assertIsArray($u);
|
|
++$i;
|
|
}
|
|
self::assertGreaterThan(0, $i);
|
|
}
|
|
}
|