update some queries in the interface to take into account history of user's scope and user's job

This commit is contained in:
2023-10-11 15:14:27 +02:00
parent 363785b779
commit 978db5a5c5
14 changed files with 210 additions and 57 deletions

View File

@@ -0,0 +1,43 @@
<?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::$container->get(UserRepository::class);
}
public function testFindAllAsArray(): void
{
$userIterator = $this->userRepository->findAllAsArray('fr');
self::assertIsIterable($userIterator);
$i = 0;
foreach ($userIterator as $u) {
self::assertIsArray($u);
}
self::assertGreaterThan(0, $i);
}
}