File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3030 Psr7 \Response };
3131use ParagonIE \Certainty \{
3232 Exception \CertaintyException ,
33- RemoteFetch
33+ Fetch
3434};
3535use PHPUnit \Framework \{
3636 Attributes \CoversClass ,
@@ -79,7 +79,7 @@ public function testConstructorDefaults(): void
7979 $ webFinger = new WebFinger ($ this ->getConfig ());
8080
8181 $ fetchProp = new ReflectionProperty (WebFinger::class, 'fetch ' );
82- $ this ->assertInstanceOf (RemoteFetch ::class, $ fetchProp ->getValue ($ webFinger ));
82+ $ this ->assertInstanceOf (Fetch ::class, $ fetchProp ->getValue ($ webFinger ));
8383
8484 $ httpProp = new ReflectionProperty (WebFinger::class, 'http ' );
8585 $ this ->assertInstanceOf (Client::class, $ httpProp ->getValue ($ webFinger ));
Original file line number Diff line number Diff line change 8282 InvalidCiphertextException
8383};
8484use ParagonIE \HPKE \HPKEException ;
85- use ParagonIE \HPKE \KEM \PostQuantumKEM ;
8685use PHPUnit \Framework \TestCase ;
8786use Psr \SimpleCache \InvalidArgumentException ;
8887use Random \RandomException ;
@@ -125,6 +124,10 @@ public function setUp(): void
125124 $ this ->truncateTables ();
126125 }
127126
127+ /**
128+ * @throws CertaintyException
129+ * @throws SodiumException
130+ */
128131 public function tearDown (): void
129132 {
130133 Handler::setWebFinger (new PKDCryptoWebFinger ());
Original file line number Diff line number Diff line change 44
55use Exception ;
66use FediE2EE \PKD \Crypto \Exceptions \BundleException ;
7- use FediE2EE \PKD \Crypto \Protocol \Actions \{
8- AddKey ,
9- RevokeKeyThirdParty
10- };
7+ use FediE2EE \PKD \Crypto \Protocol \Actions \AddKey ;
118use FediE2EE \PKD \Crypto \{AttributeEncryption \AttributeKeyMap ,
129 Exceptions \InputException ,
1310 Protocol \Handler ,
4441};
4542use FediE2EE \PKDServer \Tests \HttpTestTrait ;
4643use FediE2EE \PKDServer \Traits \ConfigTrait ;
44+ use GuzzleHttp \Exception \ServerException ;
4745use GuzzleHttp \Psr7 \Response ;
4846use PHPUnit \Framework \TestCase ;
4947use PHPUnit \Framework \Attributes \{
@@ -102,7 +100,11 @@ public function testHandle(): void
102100 $ handler = new Handler ();
103101
104102 // Add a key
105- $ addKey = new AddKey ($ canonical , $ keypair ->getPublicKey ());
103+ try {
104+ $ addKey = new AddKey ($ canonical , $ keypair ->getPublicKey ());
105+ } catch (ServerException $ ex ) {
106+ $ this ->markTestSkipped ($ ex ->getMessage ());
107+ }
106108 $ akm = (new AttributeKeyMap ())
107109 ->addKey ('actor ' , SymmetricKey::generate ())
108110 ->addKey ('public-key ' , SymmetricKey::generate ());
You can’t perform that action at this time.
0 commit comments