2828use SimpleSAML \Modules \OpenIDConnect \Factories \TemplateFactory ;
2929use SimpleSAML \Modules \OpenIDConnect \Form \ClientForm ;
3030use SimpleSAML \Modules \OpenIDConnect \Repositories \ClientRepository ;
31+ use SimpleSAML \Modules \OpenIDConnect \Services \ConfigurationService ;
3132use SimpleSAML \Modules \OpenIDConnect \Services \SessionMessagesService ;
3233use SimpleSAML \XHTML \Template ;
3334
@@ -37,6 +38,7 @@ class ClientEditControllerSpec extends ObjectBehavior
3738 * @return void
3839 */
3940 public function let (
41+ ConfigurationService $ configurationService ,
4042 ClientRepository $ clientRepository ,
4143 TemplateFactory $ templateFactory ,
4244 FormFactory $ formFactory ,
@@ -47,10 +49,12 @@ public function let(
4749 $ _SERVER ['REQUEST_URI ' ] = '/ ' ;
4850 Configuration::loadFromArray ([], '' , 'simplesaml ' );
4951
52+ $ configurationService ->getOpenIdConnectModuleURL ()->willReturn ("url " );
53+
5054 $ request ->getUri ()->willReturn ($ uri );
5155 $ uri ->getPath ()->willReturn ('/ ' );
5256
53- $ this ->beConstructedWith ($ clientRepository , $ templateFactory , $ formFactory , $ sessionMessagesService );
57+ $ this ->beConstructedWith ($ configurationService , $ clientRepository , $ templateFactory , $ formFactory , $ sessionMessagesService );
5458 }
5559
5660 /**
@@ -83,6 +87,7 @@ public function it_shows_edit_client_form(
8387 'scopes ' => ['openid ' ],
8488 'is_enabled ' => true ,
8589 ];
90+ $ clientEntity ->getIdentifier ()->shouldBeCalled ()->willReturn ('clientid ' );
8691
8792 $ request ->getQueryParams ()->shouldBeCalled ()->willReturn (['client_id ' => 'clientid ' ]);
8893 $ clientRepository ->findById ('clientid ' )->shouldBeCalled ()->willReturn ($ clientEntity );
0 commit comments