@@ -100,9 +100,9 @@ protected function createCommandHandler(EventStoreInterface $eventStore, EventBu
100
100
* @group command-handler
101
101
* @group ra-command-handler
102
102
* @expectedException \Surfnet\Stepup\Exception\DomainException
103
- * @expectedExceptionMessage An Identity may only be accredited with configured institutions
103
+ * @expectedExceptionMessage An Identity may only be accredited by configured institutions
104
104
*/
105
- public function an_identity_cannot_be_accredited_for_another_institution_than_its_own ()
105
+ public function an_identity_cannot_be_accredited_for_another_institution_than_configured ()
106
106
{
107
107
$ command = new AccreditIdentityCommand ();
108
108
$ command ->identityId = static ::uuid ();
@@ -121,7 +121,7 @@ public function an_identity_cannot_be_accredited_for_another_institution_than_it
121
121
$ secondFactorPublicId = new YubikeyPublicId ('8329283834 ' );
122
122
123
123
$ this ->institutionConfiguration
124
- ->shouldReceive ('isAllowed ' )
124
+ ->shouldReceive ('isInstitutionAllowedToAccreditRoles ' )
125
125
->andReturn (false );
126
126
127
127
$ this ->scenario
@@ -173,7 +173,7 @@ public function an_identity_cannot_be_accredited_when_it_does_not_have_a_vetted_
173
173
$ commonName = new CommonName ('Henk Westbroek ' );
174
174
175
175
$ this ->institutionConfiguration
176
- ->shouldReceive ('isAllowed ' )
176
+ ->shouldReceive ('isInstitutionAllowedToAccreditRoles ' )
177
177
->andReturn (true );
178
178
179
179
$ this ->scenario
@@ -218,7 +218,7 @@ public function an_identity_cannot_be_accredited_when_it_already_has_been_accred
218
218
$ secondFactorPublicId = new YubikeyPublicId ('8329283834 ' );
219
219
220
220
$ this ->institutionConfiguration
221
- ->shouldReceive ('isAllowed ' )
221
+ ->shouldReceive ('isInstitutionAllowedToAccreditRoles ' )
222
222
->andReturn (true );
223
223
224
224
$ this ->scenario
@@ -332,7 +332,7 @@ public function an_identity_can_be_accredited_with_ra_role()
332
332
$ raInstitution = new Institution ($ command ->raInstitution );
333
333
334
334
$ this ->institutionConfiguration
335
- ->shouldReceive ('isAllowed ' )
335
+ ->shouldReceive ('isInstitutionAllowedToAccreditRoles ' )
336
336
->andReturn (true );
337
337
338
338
$ this ->scenario
@@ -398,7 +398,7 @@ public function an_identity_can_be_accredited_with_raa_role()
398
398
$ secondFactorPublicId = new YubikeyPublicId ('8329283834 ' );
399
399
400
400
$ this ->institutionConfiguration
401
- ->shouldReceive ('isAllowed ' )
401
+ ->shouldReceive ('isInstitutionAllowedToAccreditRoles ' )
402
402
->andReturn (true );
403
403
404
404
$ this ->scenario
@@ -584,7 +584,7 @@ public function an_identity_without_vetted_second_factor_may_not_be_accredited_a
584
584
$ commonName = new CommonName ('Henk Westbroek ' );
585
585
586
586
$ this ->institutionConfiguration
587
- ->shouldReceive ('isAllowed ' )
587
+ ->shouldReceive ('isInstitutionAllowedToAccreditRoles ' )
588
588
->andReturn (true );
589
589
590
590
$ this ->scenario
@@ -627,7 +627,7 @@ public function an_identity_with_a_vetted_second_factor_can_be_accredited_as_ra(
627
627
$ raInstitution = new Institution ($ command ->raInstitution );
628
628
629
629
$ this ->institutionConfiguration
630
- ->shouldReceive ('isAllowed ' )
630
+ ->shouldReceive ('isInstitutionAllowedToAccreditRoles ' )
631
631
->andReturn (true );
632
632
633
633
$ this ->scenario
@@ -694,7 +694,7 @@ public function an_identity_cannot_be_accredited_twice()
694
694
$ secondFactorPublicId = new YubikeyPublicId ('8329283834 ' );
695
695
696
696
$ this ->institutionConfiguration
697
- ->shouldReceive ('isAllowed ' )
697
+ ->shouldReceive ('isInstitutionAllowedToAccreditRoles ' )
698
698
->andReturn (true );
699
699
700
700
$ this ->scenario
@@ -800,7 +800,7 @@ public function an_identity_that_is_accredited_as_raa_can_be_appointed_as_ra()
800
800
$ secondFactorPublicId = new YubikeyPublicId ('8329283834 ' );
801
801
802
802
$ this ->institutionConfiguration
803
- ->shouldReceive ('isAllowed ' )
803
+ ->shouldReceive ('isInstitutionAllowedToAccreditRoles ' )
804
804
->andReturn (true );
805
805
806
806
$ this ->scenario
@@ -867,7 +867,7 @@ public function an_identity_that_is_accredited_as_ra_can_be_appointed_as_raa()
867
867
$ secondFactorPublicId = new YubikeyPublicId ('8329283834 ' );
868
868
869
869
$ this ->institutionConfiguration
870
- ->shouldReceive ('isAllowed ' )
870
+ ->shouldReceive ('isInstitutionAllowedToAccreditRoles ' )
871
871
->andReturn (true );
872
872
873
873
$ this ->scenario
@@ -935,7 +935,7 @@ public function an_unaccredited_identity_cannot_be_appointed_a_registration_auth
935
935
$ secondFactorPublicId = new YubikeyPublicId ('8329283834 ' );
936
936
937
937
$ this ->institutionConfiguration
938
- ->shouldReceive ('isAllowed ' )
938
+ ->shouldReceive ('isInstitutionAllowedToAccreditRoles ' )
939
939
->andReturn (false );
940
940
941
941
$ this ->scenario
0 commit comments