|
|
@@ -122,14 +122,22 @@ class ModuleTest extends TestCase
|
|
|
$module = $this->getMockForMethod('getModulesByConditions');
|
|
|
|
|
|
$this->parameterBag->method('get')->with('opentalent.modulesbyconditions')->willReturn(
|
|
|
- ['CotisationCall' => []]
|
|
|
+ ['CotisationCall' => [
|
|
|
+ 'roles' => ['ROLE_COTISATION'],
|
|
|
+ 'conditions' => [
|
|
|
+ 'service' => [
|
|
|
+ 'name' => CotisationUtils::class,
|
|
|
+ 'function' => 'isLastParentAndCMF',
|
|
|
+ ],
|
|
|
+ ],
|
|
|
+ ]]
|
|
|
);
|
|
|
|
|
|
$organization = $this->getMockBuilder(Organization::class)->getMock();
|
|
|
$this->reflection
|
|
|
->method('dynamicInvokeServiceWithArgsAndMethod')
|
|
|
->with(CotisationUtils::class, 'isLastParentAndCMF', [$organization])
|
|
|
- ->willThrowException(new \Exception());
|
|
|
+ ->willThrowException(new \LogicException());
|
|
|
|
|
|
$this->expectException(\LogicException::class);
|
|
|
|