Merge remote-tracking branch 'origin/master' into track-address-reference-update

This commit is contained in:
2023-04-12 09:45:19 +02:00
273 changed files with 8869 additions and 3001 deletions

View File

@@ -1,5 +1,14 @@
<?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 Controller;
use Chill\MainBundle\Doctrine\Model\Point;
@@ -10,6 +19,10 @@ use Chill\MainBundle\Test\PrepareClientTrait;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
/**
* @internal
* @coversNothing
*/
class AddressToReferenceMatcherControllerTest extends WebTestCase
{
use PrepareClientTrait;

View File

@@ -1,5 +1,14 @@
<?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\MainBundle\Tests\Controller;
use Chill\MainBundle\Entity\Address;
@@ -7,6 +16,10 @@ use Chill\MainBundle\Test\PrepareClientTrait;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
/**
* @internal
* @coversNothing
*/
class GeographicalUnitByAddressApiControllerTest extends WebTestCase
{
use PrepareClientTrait;

View File

@@ -267,15 +267,15 @@ final class ExportManagerTest extends KernelTestCase
)
->willReturn(static function ($value) {
switch ($value) {
case 0:
case 1:
return $value;
case 0:
case 1:
return $value;
case '_header':
return 'export';
case '_header':
return 'export';
default: throw new RuntimeException(sprintf('The value %s is not valid', $value));
}
default: throw new RuntimeException(sprintf('The value %s is not valid', $value));
}
});
$export->getQueryKeys(Argument::Type('array'))->willReturn(['export']);
@@ -307,15 +307,15 @@ final class ExportManagerTest extends KernelTestCase
)
->willReturn(static function ($value) {
switch ($value) {
case '_header': return 'foo_header';
case '_header': return 'foo_header';
case 'cat a': return 'label cat a';
case 'cat a': return 'label cat a';
case 'cat b': return 'label cat b';
case 'cat b': return 'label cat b';
default:
throw new RuntimeException(sprintf('This value (%s) is not valid', $value));
}
default:
throw new RuntimeException(sprintf('This value (%s) is not valid', $value));
}
});
$aggregator->addRole()->willReturn(null);
//$aggregator->addRole()->shouldBeCalled();

View File

@@ -77,13 +77,13 @@ final class IdToEntityDataTransformerTest extends TestCase
public function testTransformMulti()
{
$o1 = new class() {
$o1 = new class () {
public function getId()
{
return 1;
}
};
$o2 = new class() {
$o2 = new class () {
public function getId()
{
return 2;
@@ -104,7 +104,7 @@ final class IdToEntityDataTransformerTest extends TestCase
public function testTransformSingle()
{
$o = new class() {
$o = new class () {
public function getId()
{
return 1;

View File

@@ -33,7 +33,7 @@ final class DefaultScopeResolverTest extends TestCase
public function testHasScopeInterface()
{
$scope = new Scope();
$entity = new class($scope) implements HasScopeInterface {
$entity = new class ($scope) implements HasScopeInterface {
public function __construct(Scope $scope)
{
$this->scope = $scope;
@@ -52,7 +52,7 @@ final class DefaultScopeResolverTest extends TestCase
public function testHasScopesInterface()
{
$entity = new class($scopeA = new Scope(), $scopeB = new Scope()) implements HasScopesInterface {
$entity = new class ($scopeA = new Scope(), $scopeB = new Scope()) implements HasScopesInterface {
public function __construct(Scope $scopeA, Scope $scopeB)
{
$this->scopes = [$scopeA, $scopeB];

View File

@@ -34,7 +34,7 @@ final class ScopeResolverDispatcherTest extends TestCase
public function testHasScopeInterface()
{
$scope = new Scope();
$entity = new class($scope) implements HasScopeInterface {
$entity = new class ($scope) implements HasScopeInterface {
public function __construct(Scope $scope)
{
$this->scope = $scope;
@@ -52,7 +52,7 @@ final class ScopeResolverDispatcherTest extends TestCase
public function testHasScopesInterface()
{
$entity = new class($scopeA = new Scope(), $scopeB = new Scope()) implements HasScopesInterface {
$entity = new class ($scopeA = new Scope(), $scopeB = new Scope()) implements HasScopesInterface {
public function __construct(Scope $scopeA, Scope $scopeB)
{
$this->scopes = [$scopeA, $scopeB];

View File

@@ -1,5 +1,14 @@
<?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 Services\Import;
use Chill\MainBundle\Doctrine\Model\Point;
@@ -53,7 +62,7 @@ class AddressToReferenceMatcherTest extends KernelTestCase
->setCode('78910')
->setRefPostalCodeId($refPostalCodeId = '78910'.uniqid())
->setCountry($belgium)
;
;
$this->entityManager->persist($postalCode);
$this->entityManager->flush();