@@ -78,7 +78,8 @@ public function iCanCreateAnEllipticCurveKeySetWithCurveP256(): void
7878
7979 $ command ->run ($ input , $ output );
8080 $ content = $ output ->fetch ();
81- JWKSet::createFromJson ($ content );
81+ $ jwkset = JWKSet::createFromJson ($ content );
82+ static ::assertCount (2 , $ jwkset , 'Invalid number of keys in the keyset ' );
8283 }
8384
8485 /**
@@ -96,6 +97,9 @@ public function iCannotCreateAnOctetKeySetWithoutKeySetSize(): void
9697 $ command = new OctKeysetGeneratorCommand ();
9798
9899 $ command ->run ($ input , $ output );
100+ $ content = $ output ->fetch ();
101+ $ jwkset = JWKSet::createFromJson ($ content );
102+ static ::assertCount (2 , $ jwkset , 'Invalid number of keys in the keyset ' );
99103 }
100104
101105 /**
@@ -113,7 +117,8 @@ public function iCanCreateAnOctetKeySet(): void
113117
114118 $ command ->run ($ input , $ output );
115119 $ content = $ output ->fetch ();
116- JWKSet::createFromJson ($ content );
120+ $ jwkset = JWKSet::createFromJson ($ content );
121+ static ::assertCount (2 , $ jwkset , 'Invalid number of keys in the keyset ' );
117122 }
118123
119124 /**
@@ -148,7 +153,8 @@ public function iCanCreateAnOctetKeySetPair(): void
148153
149154 $ command ->run ($ input , $ output );
150155 $ content = $ output ->fetch ();
151- JWKSet::createFromJson ($ content );
156+ $ jwkset = JWKSet::createFromJson ($ content );
157+ static ::assertCount (2 , $ jwkset , 'Invalid number of keys in the keyset ' );
152158 }
153159
154160 /**
@@ -183,6 +189,7 @@ public function iCanCreateAnRsaKeySet(): void
183189
184190 $ command ->run ($ input , $ output );
185191 $ content = $ output ->fetch ();
186- JWKSet::createFromJson ($ content );
192+ $ jwkset = JWKSet::createFromJson ($ content );
193+ static ::assertCount (2 , $ jwkset , 'Invalid number of keys in the keyset ' );
187194 }
188195}
0 commit comments