From 9273fb00752b40f98892dbd85160a890eb001398 Mon Sep 17 00:00:00 2001 From: Pol Dellaiera Date: Mon, 30 Jan 2023 09:08:18 +0100 Subject: [PATCH] fix: fix tests, remove unused dependency --- spec/EcPhp/CasLib/CasSpec.php | 9 --------- spec/EcPhp/CasLib/Handler/ProxySpec.php | 1 - spec/EcPhp/CasLib/Handler/ServiceValidateSpec.php | 2 -- spec/EcPhp/CasLib/Response/CasResponseBuilderSpec.php | 5 ----- spec/tests/EcPhp/CasLib/CasSpec.php | 2 -- 5 files changed, 19 deletions(-) diff --git a/spec/EcPhp/CasLib/CasSpec.php b/spec/EcPhp/CasLib/CasSpec.php index 1b3ef39..a9eea18 100644 --- a/spec/EcPhp/CasLib/CasSpec.php +++ b/spec/EcPhp/CasLib/CasSpec.php @@ -64,7 +64,6 @@ public function it_can_authenticate_a_request(CacheItemPoolInterface $cache) $psr17, $cache, new CasResponseBuilder( - $psr17, new AuthenticationFailureFactory(), new ProxyFactory(), new ProxyFailureFactory(), @@ -176,7 +175,6 @@ public function it_can_authenticate_a_request_in_proxy_mode(CacheItemPoolInterfa $psr17, $cache, new CasResponseBuilder( - $psr17, new AuthenticationFailureFactory(), new ProxyFactory(), new ProxyFailureFactory(), @@ -364,7 +362,6 @@ public function it_can_detect_wrong_url(CacheItemPoolInterface $cache) $psr17, $cache, new CasResponseBuilder( - $psr17, new AuthenticationFailureFactory(), new ProxyFactory(), new ProxyFailureFactory(), @@ -645,7 +642,6 @@ public function it_can_parse_json_in_a_response(CacheItemPoolInterface $cache) $psr17, $cache, new CasResponseBuilder( - $psr17, new AuthenticationFailureFactory(), new ProxyFactory(), new ProxyFailureFactory(), @@ -694,7 +690,6 @@ public function it_can_request_a_proxy_ticket(CacheItemPoolInterface $cache) $psr17, $cache, new CasResponseBuilder( - $psr17, new AuthenticationFailureFactory(), new ProxyFactory(), new ProxyFailureFactory(), @@ -751,7 +746,6 @@ public function it_can_validate_a_bad_proxy_ticket(CacheItemPoolInterface $cache $psr17, $cache, new CasResponseBuilder( - $psr17, new AuthenticationFailureFactory(), new ProxyFactory(), new ProxyFailureFactory(), @@ -780,7 +774,6 @@ public function it_can_validate_a_bad_service_validate_request(CacheItemPoolInte $psr17, $cache, new CasResponseBuilder( - $psr17, new AuthenticationFailureFactory(), new ProxyFactory(), new ProxyFailureFactory(), @@ -881,7 +874,6 @@ public function it_cannot_be_constructed_without_base_url(CacheItemPoolInterface $psr17, $cache, new CasResponseBuilder( - $psr17, new AuthenticationFailureFactory(), new ProxyFactory(), new ProxyFailureFactory(), @@ -970,7 +962,6 @@ public function let(CacheItemPoolInterface $cache, CacheItemInterface $cacheItem $psr17, $cache, new CasResponseBuilder( - $psr17, new AuthenticationFailureFactory(), new ProxyFactory(), new ProxyFailureFactory(), diff --git a/spec/EcPhp/CasLib/Handler/ProxySpec.php b/spec/EcPhp/CasLib/Handler/ProxySpec.php index fc18f0e..c2563c8 100644 --- a/spec/EcPhp/CasLib/Handler/ProxySpec.php +++ b/spec/EcPhp/CasLib/Handler/ProxySpec.php @@ -72,7 +72,6 @@ public function let(CacheItemPoolInterface $cache) [], $cache, new CasResponseBuilder( - $psr17, new AuthenticationFailureFactory(), new ProxyFactory(), new ProxyFailureFactory(), diff --git a/spec/EcPhp/CasLib/Handler/ServiceValidateSpec.php b/spec/EcPhp/CasLib/Handler/ServiceValidateSpec.php index 9c42411..5b352e9 100644 --- a/spec/EcPhp/CasLib/Handler/ServiceValidateSpec.php +++ b/spec/EcPhp/CasLib/Handler/ServiceValidateSpec.php @@ -88,7 +88,6 @@ public function it_can_get_credentials_with_pgtUrl(CacheItemPoolInterface $cache [], $cache, new CasResponseBuilder( - $psr17, new AuthenticationFailureFactory(), new ProxyFactory(), new ProxyFailureFactory(), @@ -144,7 +143,6 @@ public function let(CacheItemPoolInterface $cache) [], $cache, new CasResponseBuilder( - $psr17, new AuthenticationFailureFactory(), new ProxyFactory(), new ProxyFailureFactory(), diff --git a/spec/EcPhp/CasLib/Response/CasResponseBuilderSpec.php b/spec/EcPhp/CasLib/Response/CasResponseBuilderSpec.php index ad4e19d..f6a1ef9 100644 --- a/spec/EcPhp/CasLib/Response/CasResponseBuilderSpec.php +++ b/spec/EcPhp/CasLib/Response/CasResponseBuilderSpec.php @@ -21,7 +21,6 @@ use EcPhp\CasLib\Response\Factory\ProxyFailureFactory; use EcPhp\CasLib\Response\Factory\ServiceValidateFactory; use Exception; -use loophp\psr17\Psr17; use Nyholm\Psr7\Factory\Psr17Factory; use Nyholm\Psr7\Response; use PhpSpec\ObjectBehavior; @@ -306,12 +305,8 @@ public function it_is_initializable() public function let() { - $psr17Factory = new Psr17Factory(); - $psr17 = new Psr17($psr17Factory, $psr17Factory, $psr17Factory, $psr17Factory, $psr17Factory, $psr17Factory); - $this ->beConstructedWith( - $psr17, new AuthenticationFailureFactory(), new ProxyFactory(), new ProxyFailureFactory(), diff --git a/spec/tests/EcPhp/CasLib/CasSpec.php b/spec/tests/EcPhp/CasLib/CasSpec.php index 43a5b6d..313b41d 100644 --- a/spec/tests/EcPhp/CasLib/CasSpec.php +++ b/spec/tests/EcPhp/CasLib/CasSpec.php @@ -48,7 +48,6 @@ public function it_can_test_the_proxy_mode_with_pgtUrl() $psr17, $cache, new CasResponseBuilder( - $psr17, new AuthenticationFailureFactory(), new ProxyFactory(), new ProxyFailureFactory(), @@ -77,7 +76,6 @@ public function it_can_test_the_proxy_mode_without_pgtUrl() $psr17, new ArrayAdapter(), new CasResponseBuilder( - $psr17, new AuthenticationFailureFactory(), new ProxyFactory(), new ProxyFailureFactory(),