This commit is contained in:
2025-06-20 17:35:19 +02:00
parent 95a7efa138
commit 95975fae55
5 changed files with 156 additions and 156 deletions

View File

@@ -50,6 +50,27 @@ class FindCallerControllerTest extends TestCase
self::assertEqualsCanonicalizing($expected, $actual);
}
public static function provideFindCaller(): iterable
{
yield [
'32486540600',
[],
['found' => false, 'name' => null],
];
yield [
'32486540600',
[new Person()],
['found' => true, 'name' => 'pppp'],
]
;
yield [
'32486540600',
[new Person(), new Person()],
['found' => true, 'name' => 'multiple'],
];
}
public function testFindCallerWithoutCallerArgument(): void
{
self::expectException(BadRequestHttpException::class);
@@ -83,27 +104,6 @@ class FindCallerControllerTest extends TestCase
$controller->findCaller($request);
}
public static function provideFindCaller(): iterable
{
yield [
'32486540600',
[],
['found' => false, 'name' => null],
];
yield [
'32486540600',
[new Person()],
['found' => true, 'name' => 'pppp'],
]
;
yield [
'32486540600',
[new Person(), new Person()],
['found' => true, 'name' => 'multiple'],
];
}
private function buildController(array $personsFound): FindCallerController
{
$phonenumberHelper =