From 10ea8fbceaf80abc65ef09f0b673376cd016f20b Mon Sep 17 00:00:00 2001 From: Tim van Dijen Date: Thu, 11 Jan 2024 22:13:28 +0100 Subject: [PATCH] Remove unused use-statements and order them alphabetically --- composer.json | 3 ++- src/Backend/EncryptionBackend.php | 1 - src/Backend/OpenSSL.php | 6 +----- src/CryptoEncoding/PEMBundle.php | 3 +-- src/Key/AsymmetricKey.php | 1 - src/Key/PrivateKey.php | 1 - src/Key/PublicKey.php | 3 --- src/Key/X509Certificate.php | 1 - src/TestUtils/PEMCertificatesMock.php | 3 --- src/TestUtils/SignedElementTestTrait.php | 7 +------ src/Utils/Random.php | 2 -- src/XML/SignableElementTrait.php | 1 - src/XML/SignedElementTrait.php | 2 +- src/XML/ds/DsObject.php | 3 +-- src/XML/ds/KeyValue.php | 4 +--- src/XML/ds/RSAKeyValue.php | 1 - src/XML/ds/SignatureProperties.php | 3 --- src/XML/ds/SignatureProperty.php | 1 - src/XML/ds/SignatureValue.php | 2 +- src/XML/ds/X509IssuerSerial.php | 1 - src/XML/ds/X509SerialNumber.php | 1 - src/XML/ds/XPath.php | 2 -- src/XML/dsig11/KeyInfoReference.php | 2 -- src/XML/dsig11/X509Digest.php | 2 +- src/XML/xenc/AbstractEncryptedType.php | 2 -- src/XML/xenc/AbstractEncryptionMethod.php | 2 -- src/XML/xenc/AbstractReference.php | 2 -- src/XML/xenc/CipherData.php | 1 - tests/Alg/Signature/HMACSignatureTest.php | 6 ------ tests/Alg/Signature/RSASignatureTest.php | 4 ---- tests/Backend/OpenSSLTest.php | 2 +- tests/CryptoEncoding/PEMBundleTest.php | 1 - tests/Key/PublicKeyTest.php | 1 - tests/Key/X509CertificateTest.php | 3 --- tests/Utils/CertificateTest.php | 2 +- tests/XML/CustomSignableTest.php | 4 +--- tests/XML/SignableElementTest.php | 1 - tests/XML/SignedElementTest.php | 3 +-- tests/XML/ds/CanonicalizationMethodTest.php | 1 - tests/XML/ds/DigestMethodTest.php | 1 - tests/XML/ds/DigestValueTest.php | 1 - tests/XML/ds/ExponentTest.php | 1 - tests/XML/ds/KeyInfoTest.php | 4 +--- tests/XML/ds/KeyValueTest.php | 2 -- tests/XML/ds/ModulusTest.php | 1 - tests/XML/ds/ObjectTest.php | 2 -- tests/XML/ds/RSAKeyValueTest.php | 2 -- tests/XML/ds/RetrievalMethodTest.php | 2 -- tests/XML/ds/SignatureMethodTest.php | 1 - tests/XML/ds/SignaturePropertiesTest.php | 1 - tests/XML/ds/SignaturePropertyTest.php | 1 - tests/XML/ds/X509CertificateTest.php | 2 -- tests/XML/ds/X509DataTest.php | 9 +-------- tests/XML/ds/X509IssuerNameTest.php | 2 -- tests/XML/ds/X509IssuerSerialTest.php | 5 ++--- tests/XML/ds/X509SerialNumberTest.php | 2 -- tests/XML/ds/X509SubjectNameTest.php | 1 - tests/XML/dsig11/KeyInfoReferenceTest.php | 2 -- tests/XML/dsig11/X509DigestTest.php | 1 - tests/XML/xenc/CipherDataTest.php | 3 --- tests/XML/xenc/CipherValueTest.php | 1 - tests/XML/xenc/EncryptedDataTest.php | 2 -- tests/XML/xenc/EncryptedKeyTest.php | 5 +---- tests/XML/xenc/EncryptionMethodTest.php | 2 +- 64 files changed, 20 insertions(+), 127 deletions(-) diff --git a/composer.json b/composer.json index f87ea9cf..753079a8 100644 --- a/composer.json +++ b/composer.json @@ -50,7 +50,8 @@ }, "config": { "allow-plugins": { - "composer/package-versions-deprecated": true + "composer/package-versions-deprecated": true, + "dealerdirect/phpcodesniffer-composer-installer": true } } } diff --git a/src/Backend/EncryptionBackend.php b/src/Backend/EncryptionBackend.php index adf67974..640ee7df 100644 --- a/src/Backend/EncryptionBackend.php +++ b/src/Backend/EncryptionBackend.php @@ -4,7 +4,6 @@ namespace SimpleSAML\XMLSecurity\Backend; -use SimpleSAML\XMLSecurity\Exception\InvalidArgumentException; use SimpleSAML\XMLSecurity\Key\KeyInterface; /** diff --git a/src/Backend/OpenSSL.php b/src/Backend/OpenSSL.php index 6127142d..b961d93f 100644 --- a/src/Backend/OpenSSL.php +++ b/src/Backend/OpenSSL.php @@ -7,8 +7,8 @@ use SimpleSAML\XMLSecurity\Constants as C; use SimpleSAML\XMLSecurity\Exception\InvalidArgumentException; use SimpleSAML\XMLSecurity\Exception\RuntimeException; -use SimpleSAML\XMLSecurity\Key\KeyInterface; use SimpleSAML\XMLSecurity\Key\AsymmetricKey; +use SimpleSAML\XMLSecurity\Key\KeyInterface; use SimpleSAML\XMLSecurity\Key\PrivateKey; use SimpleSAML\XMLSecurity\Utils\Random; @@ -18,10 +18,6 @@ use function openssl_decrypt; use function openssl_encrypt; use function openssl_error_string; -use function openssl_private_decrypt; -use function openssl_public_decrypt; -use function openssl_private_encrypt; -use function openssl_public_encrypt; use function openssl_sign; use function openssl_verify; use function ord; diff --git a/src/CryptoEncoding/PEMBundle.php b/src/CryptoEncoding/PEMBundle.php index 6716ec9f..ab5ccaa2 100644 --- a/src/CryptoEncoding/PEMBundle.php +++ b/src/CryptoEncoding/PEMBundle.php @@ -8,7 +8,6 @@ use Countable; use IteratorAggregate; use LogicException; -use RuntimeException; use SimpleSAML\XMLSecurity\Exception\IOException; use UnexpectedValueException; @@ -16,9 +15,9 @@ use function array_merge; use function base64_decode; use function count; +use function file_get_contents; use function implode; use function is_readable; -use function file_get_contents; use function preg_match_all; use function preg_replace; diff --git a/src/Key/AsymmetricKey.php b/src/Key/AsymmetricKey.php index c02e9318..28520488 100644 --- a/src/Key/AsymmetricKey.php +++ b/src/Key/AsymmetricKey.php @@ -4,7 +4,6 @@ namespace SimpleSAML\XMLSecurity\Key; -use OpenSSLAsymmetricKey; use SimpleSAML\XMLSecurity\CryptoEncoding\PEM; /** diff --git a/src/Key/PrivateKey.php b/src/Key/PrivateKey.php index cc502179..c12d12dc 100644 --- a/src/Key/PrivateKey.php +++ b/src/Key/PrivateKey.php @@ -4,7 +4,6 @@ namespace SimpleSAML\XMLSecurity\Key; -use OpenSSLAsymmetricKey; use SimpleSAML\Assert\Assert; use SimpleSAML\XMLSecurity\CryptoEncoding\PEM; use SimpleSAML\XMLSecurity\Exception\RuntimeException; diff --git a/src/Key/PublicKey.php b/src/Key/PublicKey.php index 70c01652..4cb49e4b 100644 --- a/src/Key/PublicKey.php +++ b/src/Key/PublicKey.php @@ -4,15 +4,12 @@ namespace SimpleSAML\XMLSecurity\Key; -use OpenSSLAsymmetricKey; use SimpleSAML\Assert\Assert; use SimpleSAML\XMLSecurity\CryptoEncoding\PEM; -use SimpleSAML\XMLSecurity\Exception\RuntimeException; use function base64_encode; use function chr; use function chunk_split; -use function openssl_error_string; use function ord; use function pack; use function sprintf; diff --git a/src/Key/X509Certificate.php b/src/Key/X509Certificate.php index 1f275c2a..2d33df6e 100644 --- a/src/Key/X509Certificate.php +++ b/src/Key/X509Certificate.php @@ -4,7 +4,6 @@ namespace SimpleSAML\XMLSecurity\Key; -use OpenSSLCertificate; use SimpleSAML\Assert\Assert; use SimpleSAML\XMLSecurity\Constants as C; use SimpleSAML\XMLSecurity\CryptoEncoding\PEM; diff --git a/src/TestUtils/PEMCertificatesMock.php b/src/TestUtils/PEMCertificatesMock.php index 7547fc80..dbde60c7 100644 --- a/src/TestUtils/PEMCertificatesMock.php +++ b/src/TestUtils/PEMCertificatesMock.php @@ -4,7 +4,6 @@ namespace SimpleSAML\XMLSecurity\TestUtils; -use Exception; use SimpleSAML\XMLSecurity\Key\PrivateKey; use SimpleSAML\XMLSecurity\Key\PublicKey; use SimpleSAML\XMLSecurity\Key\X509Certificate; @@ -12,8 +11,6 @@ use function dirname; use function file_get_contents; -use function preg_match; -use function preg_replace; use function trim; /** diff --git a/src/TestUtils/SignedElementTestTrait.php b/src/TestUtils/SignedElementTestTrait.php index ccecdc30..3a0d120e 100644 --- a/src/TestUtils/SignedElementTestTrait.php +++ b/src/TestUtils/SignedElementTestTrait.php @@ -5,20 +5,15 @@ namespace SimpleSAML\XMLSecurity\TestUtils; use DOMDocument; -use Exception; use SimpleSAML\XMLSecurity\Alg\Signature\SignatureAlgorithmFactory; use SimpleSAML\XMLSecurity\Constants as C; use SimpleSAML\XMLSecurity\Exception\InvalidArgumentException; use SimpleSAML\XMLSecurity\Exception\NoSignatureFoundException; use SimpleSAML\XMLSecurity\Exception\SignatureVerificationFailedException; -use SimpleSAML\XMLSecurity\Exception\UnsupportedAlgorithmException; -use SimpleSAML\XMLSecurity\Key\PrivateKey; -use SimpleSAML\XMLSecurity\Key\X509Certificate as X509; +use SimpleSAML\XMLSecurity\TestUtils\PEMCertificatesMock; use SimpleSAML\XMLSecurity\XML\ds\KeyInfo; use SimpleSAML\XMLSecurity\XML\ds\X509Certificate; use SimpleSAML\XMLSecurity\XML\ds\X509Data; -use SimpleSAML\XMLSecurity\TestUtils\PEMCertificatesMock; -use SimpleSAML\XMLSecurity\Utils\Certificate as CertificateUtils; use function array_keys; use function boolval; diff --git a/src/Utils/Random.php b/src/Utils/Random.php index 9d2caad3..8897b851 100644 --- a/src/Utils/Random.php +++ b/src/Utils/Random.php @@ -10,9 +10,7 @@ use SimpleSAML\XMLSecurity\Exception\InvalidArgumentException; use SimpleSAML\XMLSecurity\Exception\RuntimeException; -use function bin2hex; use function random_bytes; -use function substr; /** * A collection of utilities to generate cryptographically-secure random data. diff --git a/src/XML/SignableElementTrait.php b/src/XML/SignableElementTrait.php index f9b36323..eef4e6c8 100644 --- a/src/XML/SignableElementTrait.php +++ b/src/XML/SignableElementTrait.php @@ -9,7 +9,6 @@ use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XMLSecurity\Alg\Signature\SignatureAlgorithmInterface; use SimpleSAML\XMLSecurity\Constants as C; -use SimpleSAML\XMLSecurity\Exception\InvalidArgumentException; use SimpleSAML\XMLSecurity\Exception\RuntimeException; use SimpleSAML\XMLSecurity\Exception\UnsupportedAlgorithmException; use SimpleSAML\XMLSecurity\Utils\Security; diff --git a/src/XML/SignedElementTrait.php b/src/XML/SignedElementTrait.php index c595a1e7..28435d7c 100644 --- a/src/XML/SignedElementTrait.php +++ b/src/XML/SignedElementTrait.php @@ -17,8 +17,8 @@ use SimpleSAML\XMLSecurity\Exception\ReferenceValidationFailedException; use SimpleSAML\XMLSecurity\Exception\RuntimeException; use SimpleSAML\XMLSecurity\Exception\SignatureVerificationFailedException; -use SimpleSAML\XMLSecurity\Key\KeyInterface; use SimpleSAML\XMLSecurity\Key; +use SimpleSAML\XMLSecurity\Key\KeyInterface; use SimpleSAML\XMLSecurity\Utils\Security; use SimpleSAML\XMLSecurity\Utils\XML; use SimpleSAML\XMLSecurity\Utils\XPath; diff --git a/src/XML/ds/DsObject.php b/src/XML/ds/DsObject.php index 7d46e240..931c686d 100644 --- a/src/XML/ds/DsObject.php +++ b/src/XML/ds/DsObject.php @@ -7,10 +7,9 @@ use DOMElement; use SimpleSAML\Assert\Assert; use SimpleSAML\XML\Chunk; -use SimpleSAML\XML\XsNamespace as NS; use SimpleSAML\XML\Exception\InvalidDOMElementException; use SimpleSAML\XML\ExtendableElementTrait; -use SimpleSAML\XMLSecurity\Exception\InvalidArgumentException; +use SimpleSAML\XML\XsNamespace as NS; /** * Class representing a ds:Object element. diff --git a/src/XML/ds/KeyValue.php b/src/XML/ds/KeyValue.php index 3b10bd6b..46faf870 100644 --- a/src/XML/ds/KeyValue.php +++ b/src/XML/ds/KeyValue.php @@ -7,14 +7,12 @@ use DOMElement; use SimpleSAML\Assert\Assert; use SimpleSAML\XML\Chunk; +use SimpleSAML\XML\ElementInterface; use SimpleSAML\XML\Exception\InvalidDOMElementException; -use SimpleSAML\XML\Exception\MissingElementException; use SimpleSAML\XML\Exception\SchemaViolationException; use SimpleSAML\XML\Exception\TooManyElementsException; use SimpleSAML\XML\ExtendableElementTrait; -use SimpleSAML\XML\ElementInterface; use SimpleSAML\XML\XsNamespace as NS; -use SimpleSAML\XMLSecurity\Exception\InvalidArgumentException; /** * Class representing a ds:KeyValue element. diff --git a/src/XML/ds/RSAKeyValue.php b/src/XML/ds/RSAKeyValue.php index 3393e12a..ab061516 100644 --- a/src/XML/ds/RSAKeyValue.php +++ b/src/XML/ds/RSAKeyValue.php @@ -9,7 +9,6 @@ use SimpleSAML\XML\Exception\InvalidDOMElementException; use SimpleSAML\XML\Exception\MissingElementException; use SimpleSAML\XML\Exception\TooManyElementsException; -use SimpleSAML\XMLSecurity\Exception\InvalidArgumentException; /** * Class representing a ds:RSAKeyValue element. diff --git a/src/XML/ds/SignatureProperties.php b/src/XML/ds/SignatureProperties.php index 6043b9f4..3735a12d 100644 --- a/src/XML/ds/SignatureProperties.php +++ b/src/XML/ds/SignatureProperties.php @@ -6,13 +6,10 @@ use DOMElement; use SimpleSAML\Assert\Assert; -use SimpleSAML\XML\Chunk; use SimpleSAML\XML\Constants as C; use SimpleSAML\XML\Exception\InvalidDOMElementException; use SimpleSAML\XML\Exception\MissingElementException; use SimpleSAML\XML\Exception\SchemaViolationException; -use SimpleSAML\XML\ExtendableElementTrait; -use SimpleSAML\XML\SerializableElementInterface; /** * Class representing a ds:SignatureProperties element. diff --git a/src/XML/ds/SignatureProperty.php b/src/XML/ds/SignatureProperty.php index a8e39702..2b90cec7 100644 --- a/src/XML/ds/SignatureProperty.php +++ b/src/XML/ds/SignatureProperty.php @@ -11,7 +11,6 @@ use SimpleSAML\XML\Exception\MissingElementException; use SimpleSAML\XML\Exception\SchemaViolationException; use SimpleSAML\XML\ExtendableElementTrait; -use SimpleSAML\XML\SerializableElementInterface; use SimpleSAML\XML\XsNamespace as NS; /** diff --git a/src/XML/ds/SignatureValue.php b/src/XML/ds/SignatureValue.php index 19e91a37..37866e93 100644 --- a/src/XML/ds/SignatureValue.php +++ b/src/XML/ds/SignatureValue.php @@ -6,8 +6,8 @@ use DOMElement; use SimpleSAML\Assert\Assert; -use SimpleSAML\XML\Exception\InvalidDOMElementException; use SimpleSAML\XML\Base64ElementTrait; +use SimpleSAML\XML\Exception\InvalidDOMElementException; /** * Class representing a ds:SignatureValue element. diff --git a/src/XML/ds/X509IssuerSerial.php b/src/XML/ds/X509IssuerSerial.php index 1bce9f6e..483d1906 100644 --- a/src/XML/ds/X509IssuerSerial.php +++ b/src/XML/ds/X509IssuerSerial.php @@ -9,7 +9,6 @@ use SimpleSAML\XML\Exception\InvalidDOMElementException; use SimpleSAML\XML\Exception\MissingElementException; use SimpleSAML\XML\Exception\TooManyElementsException; -use SimpleSAML\XML\Utils as XMLUtils; use function array_pop; diff --git a/src/XML/ds/X509SerialNumber.php b/src/XML/ds/X509SerialNumber.php index 9e929ef9..d7b65913 100644 --- a/src/XML/ds/X509SerialNumber.php +++ b/src/XML/ds/X509SerialNumber.php @@ -6,7 +6,6 @@ use DOMElement; use SimpleSAML\Assert\Assert; -use SimpleSAML\XML\Constants as C; use SimpleSAML\XML\Exception\InvalidDOMElementException; use SimpleSAML\XML\Exception\SchemaViolationException; use SimpleSAML\XML\StringElementTrait; diff --git a/src/XML/ds/XPath.php b/src/XML/ds/XPath.php index 9ad85146..82c7d866 100644 --- a/src/XML/ds/XPath.php +++ b/src/XML/ds/XPath.php @@ -11,8 +11,6 @@ use SimpleSAML\XMLSecurity\Exception\InvalidArgumentException; use SimpleSAML\XMLSecurity\Utils\XPath as XPathUtils; -use function str_replace; - /** * Class implementing the XPath element. * diff --git a/src/XML/dsig11/KeyInfoReference.php b/src/XML/dsig11/KeyInfoReference.php index cd89e5f4..e1bdc5f6 100644 --- a/src/XML/dsig11/KeyInfoReference.php +++ b/src/XML/dsig11/KeyInfoReference.php @@ -8,8 +8,6 @@ use SimpleSAML\Assert\Assert; use SimpleSAML\XML\Exception\InvalidDOMElementException; use SimpleSAML\XML\Exception\SchemaViolationException; -use SimpleSAML\XMLSecurity\Constants as C; -use SimpleSAML\XMLSecurity\Exception\InvalidArgumentException; /** * Class representing a dsig11:KeyInfoReference element. diff --git a/src/XML/dsig11/X509Digest.php b/src/XML/dsig11/X509Digest.php index d440410f..3072bf54 100644 --- a/src/XML/dsig11/X509Digest.php +++ b/src/XML/dsig11/X509Digest.php @@ -6,11 +6,11 @@ use DOMElement; use SimpleSAML\Assert\Assert; +use SimpleSAML\XML\Base64ElementTrait; use SimpleSAML\XML\Exception\InvalidDOMElementException; use SimpleSAML\XML\Exception\SchemaViolationException; use SimpleSAML\XMLSecurity\Constants as C; use SimpleSAML\XMLSecurity\Exception\InvalidArgumentException; -use SimpleSAML\XML\Base64ElementTrait; /** * Class representing a dsig11:X509Digest element. diff --git a/src/XML/xenc/AbstractEncryptedType.php b/src/XML/xenc/AbstractEncryptedType.php index 4a0ff6e5..6a3e7c96 100644 --- a/src/XML/xenc/AbstractEncryptedType.php +++ b/src/XML/xenc/AbstractEncryptedType.php @@ -9,8 +9,6 @@ use SimpleSAML\XML\Exception\SchemaViolationException; use SimpleSAML\XMLSecurity\XML\ds\KeyInfo; -use function count; - /** * Abstract class representing encrypted data. * diff --git a/src/XML/xenc/AbstractEncryptionMethod.php b/src/XML/xenc/AbstractEncryptionMethod.php index a65a58b3..d77fa5ae 100644 --- a/src/XML/xenc/AbstractEncryptionMethod.php +++ b/src/XML/xenc/AbstractEncryptionMethod.php @@ -13,10 +13,8 @@ use SimpleSAML\XML\ExtendableElementTrait; use SimpleSAML\XML\XsNamespace as NS; use SimpleSAML\XMLSecurity\Constants as C; -use SimpleSAML\XMLSecurity\Exception\InvalidArgumentException; use function array_pop; -use function sprintf; /** * A class implementing the xenc:AbstractEncryptionMethod element. diff --git a/src/XML/xenc/AbstractReference.php b/src/XML/xenc/AbstractReference.php index c5679a54..8d214058 100644 --- a/src/XML/xenc/AbstractReference.php +++ b/src/XML/xenc/AbstractReference.php @@ -7,12 +7,10 @@ use DOMElement; use SimpleSAML\Assert\Assert; use SimpleSAML\XML\Chunk; -use SimpleSAML\XML\ElementInterface; use SimpleSAML\XML\Exception\InvalidDOMElementException; use SimpleSAML\XML\Exception\SchemaViolationException; use SimpleSAML\XML\ExtendableElementTrait; use SimpleSAML\XML\XsNamespace as NS; -use SimpleSAML\XMLSecurity\XML\xenc\Transforms; /** * Abstract class representing references. No custom elements are allowed. diff --git a/src/XML/xenc/CipherData.php b/src/XML/xenc/CipherData.php index 035e8b03..d0ce6337 100644 --- a/src/XML/xenc/CipherData.php +++ b/src/XML/xenc/CipherData.php @@ -8,7 +8,6 @@ use SimpleSAML\Assert\Assert; use SimpleSAML\XML\Exception\InvalidDOMElementException; use SimpleSAML\XML\Exception\TooManyElementsException; -use SimpleSAML\XMLSecurity\Utils\XPath; use function array_pop; diff --git a/tests/Alg/Signature/HMACSignatureTest.php b/tests/Alg/Signature/HMACSignatureTest.php index 7bf993bb..b83432df 100644 --- a/tests/Alg/Signature/HMACSignatureTest.php +++ b/tests/Alg/Signature/HMACSignatureTest.php @@ -5,15 +5,9 @@ namespace SimpleSAML\XMLSecurity\Test\Alg\Signature; use PHPUnit\Framework\TestCase; -use SimpleSAML\XMLSecurity\Alg\Signature\HMAC; use SimpleSAML\XMLSecurity\Alg\Signature\SignatureAlgorithmFactory; use SimpleSAML\XMLSecurity\Constants as C; -use SimpleSAML\XMLSecurity\Key\PrivateKey; -use SimpleSAML\XMLSecurity\Key\PublicKey; use SimpleSAML\XMLSecurity\Key\SymmetricKey; -use SimpleSAML\XMLSecurity\Key\X509Certificate; -use SimpleSAML\XMLSecurity\TestUtils\PEMCertificatesMock; -use TypeError; use function bin2hex; use function hex2bin; diff --git a/tests/Alg/Signature/RSASignatureTest.php b/tests/Alg/Signature/RSASignatureTest.php index 0a29edcd..97b3b0c8 100644 --- a/tests/Alg/Signature/RSASignatureTest.php +++ b/tests/Alg/Signature/RSASignatureTest.php @@ -5,15 +5,11 @@ namespace SimpleSAML\XMLSecurity\Test\Alg\Signature; use PHPUnit\Framework\TestCase; -use SimpleSAML\XMLSecurity\Alg\Signature\RSA; use SimpleSAML\XMLSecurity\Alg\Signature\SignatureAlgorithmFactory; use SimpleSAML\XMLSecurity\Constants as C; use SimpleSAML\XMLSecurity\Key\PrivateKey; use SimpleSAML\XMLSecurity\Key\PublicKey; -use SimpleSAML\XMLSecurity\Key\SymmetricKey; -use SimpleSAML\XMLSecurity\Key\X509Certificate; use SimpleSAML\XMLSecurity\TestUtils\PEMCertificatesMock; -use TypeError; use function bin2hex; use function hex2bin; diff --git a/tests/Backend/OpenSSLTest.php b/tests/Backend/OpenSSLTest.php index c73787c9..9b28151a 100644 --- a/tests/Backend/OpenSSLTest.php +++ b/tests/Backend/OpenSSLTest.php @@ -13,8 +13,8 @@ use SimpleSAML\XMLSecurity\Key\PublicKey; use SimpleSAML\XMLSecurity\Key\SymmetricKey; -use function dirname; use function bin2hex; +use function dirname; use function hex2bin; /** diff --git a/tests/CryptoEncoding/PEMBundleTest.php b/tests/CryptoEncoding/PEMBundleTest.php index 54ac3c15..d57ed5c0 100644 --- a/tests/CryptoEncoding/PEMBundleTest.php +++ b/tests/CryptoEncoding/PEMBundleTest.php @@ -6,7 +6,6 @@ use LogicException; use PHPUnit\Framework\TestCase; -use RuntimeException; use SimpleSAML\XMLSecurity\CryptoEncoding\PEM; use SimpleSAML\XMLSecurity\CryptoEncoding\PEMBundle; use SimpleSAML\XMLSecurity\Exception\IOException; diff --git a/tests/Key/PublicKeyTest.php b/tests/Key/PublicKeyTest.php index 97faa842..b1724c35 100644 --- a/tests/Key/PublicKeyTest.php +++ b/tests/Key/PublicKeyTest.php @@ -10,7 +10,6 @@ use SimpleSAML\XMLSecurity\Key\PublicKey; use SimpleSAML\XMLSecurity\TestUtils\PEMCertificatesMock; -use function file_get_contents; use function openssl_pkey_get_details; use function openssl_pkey_get_public; diff --git a/tests/Key/X509CertificateTest.php b/tests/Key/X509CertificateTest.php index ad74856c..da17b064 100644 --- a/tests/Key/X509CertificateTest.php +++ b/tests/Key/X509CertificateTest.php @@ -5,14 +5,11 @@ namespace SimpleSAML\XMLSecurity\Test\Key; use PHPUnit\Framework\TestCase; -use ReflectionMethod; -use SimpleSAML\XMLSecurity\Constants as C; use SimpleSAML\XMLSecurity\CryptoEncoding\PEM; use SimpleSAML\XMLSecurity\Exception\UnsupportedAlgorithmException; use SimpleSAML\XMLSecurity\Key\X509Certificate; use SimpleSAML\XMLSecurity\TestUtils\PEMCertificatesMock; -use function file_get_contents; use function openssl_pkey_get_details; use function openssl_pkey_get_public; use function openssl_x509_fingerprint; diff --git a/tests/Utils/CertificateTest.php b/tests/Utils/CertificateTest.php index 96eab931..c4be876b 100644 --- a/tests/Utils/CertificateTest.php +++ b/tests/Utils/CertificateTest.php @@ -5,8 +5,8 @@ namespace SimpleSAML\XMLSecurity\Test\Utils; use PHPUnit\Framework\TestCase; -use SimpleSAML\XMLSecurity\Utils\Certificate; use SimpleSAML\XMLSecurity\TestUtils\PEMCertificatesMock; +use SimpleSAML\XMLSecurity\Utils\Certificate; /** * @covers \SimpleSAML\XMLSecurity\Utils\Certificate diff --git a/tests/XML/CustomSignableTest.php b/tests/XML/CustomSignableTest.php index 76aebcfb..8781b0ab 100644 --- a/tests/XML/CustomSignableTest.php +++ b/tests/XML/CustomSignableTest.php @@ -4,12 +4,10 @@ namespace SimpleSAML\XMLSecurity\Test\XML; -use DOMDocument; -use DOMElement; use PHPUnit\Framework\TestCase; -use SimpleSAML\XMLSecurity\TestUtils\SignedElementTestTrait; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\TestUtils\SerializableElementTestTrait; +use SimpleSAML\XMLSecurity\TestUtils\SignedElementTestTrait; use function dirname; use function strval; diff --git a/tests/XML/SignableElementTest.php b/tests/XML/SignableElementTest.php index 6cb906a4..69839612 100644 --- a/tests/XML/SignableElementTest.php +++ b/tests/XML/SignableElementTest.php @@ -21,7 +21,6 @@ use function array_shift; use function dirname; use function explode; -use function file_get_contents; use function join; use function strval; use function trim; diff --git a/tests/XML/SignedElementTest.php b/tests/XML/SignedElementTest.php index 124737b4..f897e830 100644 --- a/tests/XML/SignedElementTest.php +++ b/tests/XML/SignedElementTest.php @@ -13,11 +13,10 @@ use SimpleSAML\XMLSecurity\Exception\RuntimeException; use SimpleSAML\XMLSecurity\Key\PublicKey; use SimpleSAML\XMLSecurity\Key\X509Certificate; -use SimpleSAML\XMLSecurity\XML\ds\Signature; use SimpleSAML\XMLSecurity\TestUtils\PEMCertificatesMock; +use SimpleSAML\XMLSecurity\XML\ds\Signature; use function dirname; -use function file_get_contents; use function strval; /** diff --git a/tests/XML/ds/CanonicalizationMethodTest.php b/tests/XML/ds/CanonicalizationMethodTest.php index 74ef0bec..67b11b93 100644 --- a/tests/XML/ds/CanonicalizationMethodTest.php +++ b/tests/XML/ds/CanonicalizationMethodTest.php @@ -4,7 +4,6 @@ namespace SimpleSAML\XMLSecurity\Test\XML\ds; -use DOMDocument; use PHPUnit\Framework\TestCase; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\TestUtils\SchemaValidationTestTrait; diff --git a/tests/XML/ds/DigestMethodTest.php b/tests/XML/ds/DigestMethodTest.php index 69730971..d89c8b10 100644 --- a/tests/XML/ds/DigestMethodTest.php +++ b/tests/XML/ds/DigestMethodTest.php @@ -4,7 +4,6 @@ namespace SimpleSAML\XMLSecurity\Test\XML\ds; -use DOMDocument; use PHPUnit\Framework\TestCase; use SimpleSAML\XML\Chunk; use SimpleSAML\XML\DOMDocumentFactory; diff --git a/tests/XML/ds/DigestValueTest.php b/tests/XML/ds/DigestValueTest.php index a6a8996b..8724b15f 100644 --- a/tests/XML/ds/DigestValueTest.php +++ b/tests/XML/ds/DigestValueTest.php @@ -4,7 +4,6 @@ namespace SimpleSAML\XMLSecurity\Test\XML\ds; -use DOMDocument; use PHPUnit\Framework\TestCase; use SimpleSAML\Assert\AssertionFailedException; use SimpleSAML\XML\DOMDocumentFactory; diff --git a/tests/XML/ds/ExponentTest.php b/tests/XML/ds/ExponentTest.php index 93969535..ff9e098c 100644 --- a/tests/XML/ds/ExponentTest.php +++ b/tests/XML/ds/ExponentTest.php @@ -4,7 +4,6 @@ namespace SimpleSAML\XMLSecurity\Test\XML\ds; -use DOMDocument; use PHPUnit\Framework\TestCase; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\Exception\SchemaViolationException; diff --git a/tests/XML/ds/KeyInfoTest.php b/tests/XML/ds/KeyInfoTest.php index 0551b070..8054aa1d 100644 --- a/tests/XML/ds/KeyInfoTest.php +++ b/tests/XML/ds/KeyInfoTest.php @@ -5,19 +5,17 @@ namespace SimpleSAML\XMLSecurity\Test\XML\ds; use PHPUnit\Framework\TestCase; -use SimpleSAML\Assert\AssertionFailedException; use SimpleSAML\XML\Chunk; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\TestUtils\SchemaValidationTestTrait; use SimpleSAML\XML\TestUtils\SerializableElementTestTrait; -use SimpleSAML\XMLSecurity\Constants as C; use SimpleSAML\XMLSecurity\Exception\InvalidArgumentException; +use SimpleSAML\XMLSecurity\TestUtils\PEMCertificatesMock; use SimpleSAML\XMLSecurity\XML\ds\KeyInfo; use SimpleSAML\XMLSecurity\XML\ds\KeyName; use SimpleSAML\XMLSecurity\XML\ds\X509Certificate; use SimpleSAML\XMLSecurity\XML\ds\X509Data; use SimpleSAML\XMLSecurity\XML\ds\X509SubjectName; -use SimpleSAML\XMLSecurity\TestUtils\PEMCertificatesMock; use function dirname; use function openssl_x509_parse; diff --git a/tests/XML/ds/KeyValueTest.php b/tests/XML/ds/KeyValueTest.php index 4f95c102..2b6e546f 100644 --- a/tests/XML/ds/KeyValueTest.php +++ b/tests/XML/ds/KeyValueTest.php @@ -11,9 +11,7 @@ use SimpleSAML\XML\Exception\SchemaViolationException; use SimpleSAML\XML\TestUtils\SchemaValidationTestTrait; use SimpleSAML\XML\TestUtils\SerializableElementTestTrait; -use SimpleSAML\XMLSecurity\XML\ds\Exponent; use SimpleSAML\XMLSecurity\XML\ds\KeyValue; -use SimpleSAML\XMLSecurity\XML\ds\Modulus; use SimpleSAML\XMLSecurity\XML\ds\RSAKeyValue; use function dirname; diff --git a/tests/XML/ds/ModulusTest.php b/tests/XML/ds/ModulusTest.php index 523269e1..d0c49717 100644 --- a/tests/XML/ds/ModulusTest.php +++ b/tests/XML/ds/ModulusTest.php @@ -4,7 +4,6 @@ namespace SimpleSAML\XMLSecurity\Test\XML\ds; -use DOMDocument; use PHPUnit\Framework\TestCase; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\Exception\SchemaViolationException; diff --git a/tests/XML/ds/ObjectTest.php b/tests/XML/ds/ObjectTest.php index c6259c09..8ac452c3 100644 --- a/tests/XML/ds/ObjectTest.php +++ b/tests/XML/ds/ObjectTest.php @@ -4,13 +4,11 @@ namespace SimpleSAML\XMLSecurity\Test\XML\ds; -use DOMDocument; use PHPUnit\Framework\TestCase; use SimpleSAML\XML\Chunk; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\TestUtils\SchemaValidationTestTrait; use SimpleSAML\XML\TestUtils\SerializableElementTestTrait; -use SimpleSAML\XMLSecurity\Constants; use SimpleSAML\XMLSecurity\XML\ds\DsObject; /** diff --git a/tests/XML/ds/RSAKeyValueTest.php b/tests/XML/ds/RSAKeyValueTest.php index 34934039..7e1b8f0d 100644 --- a/tests/XML/ds/RSAKeyValueTest.php +++ b/tests/XML/ds/RSAKeyValueTest.php @@ -4,10 +4,8 @@ namespace SimpleSAML\XMLSecurity\Test\XML\ds; -use DOMDocument; use PHPUnit\Framework\TestCase; use SimpleSAML\XML\DOMDocumentFactory; -use SimpleSAML\XML\Exception\SchemaViolationException; use SimpleSAML\XML\TestUtils\SchemaValidationTestTrait; use SimpleSAML\XML\TestUtils\SerializableElementTestTrait; use SimpleSAML\XML\Utils\XPath; diff --git a/tests/XML/ds/RetrievalMethodTest.php b/tests/XML/ds/RetrievalMethodTest.php index 81953440..388c69ae 100644 --- a/tests/XML/ds/RetrievalMethodTest.php +++ b/tests/XML/ds/RetrievalMethodTest.php @@ -4,14 +4,12 @@ namespace SimpleSAML\XMLSecurity\Test\XML\ds; -use DOMElement; use PHPUnit\Framework\TestCase; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\TestUtils\SchemaValidationTestTrait; use SimpleSAML\XML\TestUtils\SerializableElementTestTrait; use SimpleSAML\XMLSecurity\Constants as C; use SimpleSAML\XMLSecurity\XML\ds\RetrievalMethod; -use SimpleSAML\XMLSecurity\XML\ds\Reference; use SimpleSAML\XMLSecurity\XML\ds\Transform; use SimpleSAML\XMLSecurity\XML\ds\Transforms; use SimpleSAML\XMLSecurity\XML\ds\XPath; diff --git a/tests/XML/ds/SignatureMethodTest.php b/tests/XML/ds/SignatureMethodTest.php index 1166b41c..348378ac 100644 --- a/tests/XML/ds/SignatureMethodTest.php +++ b/tests/XML/ds/SignatureMethodTest.php @@ -4,7 +4,6 @@ namespace SimpleSAML\XMLSecurity\Test\XML\ds; -use DOMDocument; use PHPUnit\Framework\TestCase; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\TestUtils\SchemaValidationTestTrait; diff --git a/tests/XML/ds/SignaturePropertiesTest.php b/tests/XML/ds/SignaturePropertiesTest.php index e5aca637..cdaf1f71 100644 --- a/tests/XML/ds/SignaturePropertiesTest.php +++ b/tests/XML/ds/SignaturePropertiesTest.php @@ -9,7 +9,6 @@ use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\TestUtils\SchemaValidationTestTrait; use SimpleSAML\XML\TestUtils\SerializableElementTestTrait; -use SimpleSAML\XMLSecurity\Constants as C; use SimpleSAML\XMLSecurity\XML\ds\SignatureProperties; use SimpleSAML\XMLSecurity\XML\ds\SignatureProperty; diff --git a/tests/XML/ds/SignaturePropertyTest.php b/tests/XML/ds/SignaturePropertyTest.php index 21d2e33c..933ac844 100644 --- a/tests/XML/ds/SignaturePropertyTest.php +++ b/tests/XML/ds/SignaturePropertyTest.php @@ -9,7 +9,6 @@ use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\TestUtils\SchemaValidationTestTrait; use SimpleSAML\XML\TestUtils\SerializableElementTestTrait; -use SimpleSAML\XMLSecurity\Constants as C; use SimpleSAML\XMLSecurity\XML\ds\SignatureProperty; use function dirname; diff --git a/tests/XML/ds/X509CertificateTest.php b/tests/XML/ds/X509CertificateTest.php index 8f9a688f..25897b34 100644 --- a/tests/XML/ds/X509CertificateTest.php +++ b/tests/XML/ds/X509CertificateTest.php @@ -4,11 +4,9 @@ namespace SimpleSAML\XMLSecurity\Test\XML\ds; -use DOMDocument; use PHPUnit\Framework\TestCase; use SimpleSAML\Assert\AssertionFailedException; use SimpleSAML\XML\DOMDocumentFactory; -use SimpleSAML\XML\TestUtils\SchemaValidationTestTrait; use SimpleSAML\XML\TestUtils\SerializableElementTestTrait; use SimpleSAML\XMLSecurity\Test\XML\XMLDumper; use SimpleSAML\XMLSecurity\TestUtils\PEMCertificatesMock; diff --git a/tests/XML/ds/X509DataTest.php b/tests/XML/ds/X509DataTest.php index f8b2e020..a2a57b54 100644 --- a/tests/XML/ds/X509DataTest.php +++ b/tests/XML/ds/X509DataTest.php @@ -4,27 +4,20 @@ namespace SimpleSAML\XMLSecurity\Test\XML\ds; -use DOMDocument; use PHPUnit\Framework\TestCase; -use SimpleSAML\Assert\AssertionFailedException; use SimpleSAML\XML\Chunk; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\TestUtils\SchemaValidationTestTrait; use SimpleSAML\XML\TestUtils\SerializableElementTestTrait; -use SimpleSAML\XML\Utils as XMLUtils; -use SimpleSAML\XMLSecurity\Constants as C; -use SimpleSAML\XMLSecurity\CryptoEncoding\PEM; +use SimpleSAML\XMLSecurity\TestUtils\PEMCertificatesMock; use SimpleSAML\XMLSecurity\XML\ds\X509Certificate; use SimpleSAML\XMLSecurity\XML\ds\X509Data; use SimpleSAML\XMLSecurity\XML\ds\X509IssuerName; use SimpleSAML\XMLSecurity\XML\ds\X509IssuerSerial; use SimpleSAML\XMLSecurity\XML\ds\X509SerialNumber; use SimpleSAML\XMLSecurity\XML\ds\X509SubjectName; -use SimpleSAML\XMLSecurity\TestUtils\PEMCertificatesMock; -use function base64_encode; use function dirname; -use function hex2bin; use function openssl_x509_parse; use function str_replace; use function strval; diff --git a/tests/XML/ds/X509IssuerNameTest.php b/tests/XML/ds/X509IssuerNameTest.php index cc0adcac..35931fad 100644 --- a/tests/XML/ds/X509IssuerNameTest.php +++ b/tests/XML/ds/X509IssuerNameTest.php @@ -4,9 +4,7 @@ namespace SimpleSAML\XMLSecurity\Test\XML\ds; -use DOMDocument; use PHPUnit\Framework\TestCase; -use SimpleSAML\Assert\AssertionFailedException; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\TestUtils\SerializableElementTestTrait; use SimpleSAML\XMLSecurity\XML\ds\X509IssuerName; diff --git a/tests/XML/ds/X509IssuerSerialTest.php b/tests/XML/ds/X509IssuerSerialTest.php index 16416a5d..66e5a443 100644 --- a/tests/XML/ds/X509IssuerSerialTest.php +++ b/tests/XML/ds/X509IssuerSerialTest.php @@ -4,17 +4,16 @@ namespace SimpleSAML\XMLSecurity\Test\XML\ds; -use DOMDocument; use PHPUnit\Framework\TestCase; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\TestUtils\SerializableElementTestTrait; use SimpleSAML\XMLSecurity\CryptoEncoding\PEM; use SimpleSAML\XMLSecurity\Key; -use SimpleSAML\XMLSecurity\Utils\Certificate as CertificateUtils; use SimpleSAML\XMLSecurity\TestUtils\PEMCertificatesMock; +use SimpleSAML\XMLSecurity\Utils\Certificate as CertificateUtils; use SimpleSAML\XMLSecurity\Utils\XPath; -use SimpleSAML\XMLSecurity\XML\ds\X509IssuerSerial; use SimpleSAML\XMLSecurity\XML\ds\X509IssuerName; +use SimpleSAML\XMLSecurity\XML\ds\X509IssuerSerial; use SimpleSAML\XMLSecurity\XML\ds\X509SerialNumber; use function dirname; diff --git a/tests/XML/ds/X509SerialNumberTest.php b/tests/XML/ds/X509SerialNumberTest.php index 9533d4d0..eea277f2 100644 --- a/tests/XML/ds/X509SerialNumberTest.php +++ b/tests/XML/ds/X509SerialNumberTest.php @@ -4,9 +4,7 @@ namespace SimpleSAML\XMLSecurity\Test\XML\ds; -use DOMDocument; use PHPUnit\Framework\TestCase; -use SimpleSAML\XML\Constants as C; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\Exception\SchemaViolationException; use SimpleSAML\XML\TestUtils\SerializableElementTestTrait; diff --git a/tests/XML/ds/X509SubjectNameTest.php b/tests/XML/ds/X509SubjectNameTest.php index 750a0b33..f83f24e8 100644 --- a/tests/XML/ds/X509SubjectNameTest.php +++ b/tests/XML/ds/X509SubjectNameTest.php @@ -4,7 +4,6 @@ namespace SimpleSAML\XMLSecurity\Test\XML\ds; -use DOMDocument; use PHPUnit\Framework\TestCase; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\TestUtils\SerializableElementTestTrait; diff --git a/tests/XML/dsig11/KeyInfoReferenceTest.php b/tests/XML/dsig11/KeyInfoReferenceTest.php index aa680fd6..da4e3cf2 100644 --- a/tests/XML/dsig11/KeyInfoReferenceTest.php +++ b/tests/XML/dsig11/KeyInfoReferenceTest.php @@ -4,12 +4,10 @@ namespace SimpleSAML\XMLSecurity\Test\XML\dsig11; -use DOMDocument; use PHPUnit\Framework\TestCase; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\TestUtils\SchemaValidationTestTrait; use SimpleSAML\XML\TestUtils\SerializableElementTestTrait; -use SimpleSAML\XMLSecurity\Constants as C; use SimpleSAML\XMLSecurity\XML\dsig11\KeyInfoReference; use function dirname; diff --git a/tests/XML/dsig11/X509DigestTest.php b/tests/XML/dsig11/X509DigestTest.php index e5b264bb..5687dcbd 100644 --- a/tests/XML/dsig11/X509DigestTest.php +++ b/tests/XML/dsig11/X509DigestTest.php @@ -4,7 +4,6 @@ namespace SimpleSAML\XMLSecurity\Test\XML\dsig11; -use DOMDocument; use PHPUnit\Framework\TestCase; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\TestUtils\SchemaValidationTestTrait; diff --git a/tests/XML/xenc/CipherDataTest.php b/tests/XML/xenc/CipherDataTest.php index 6ce80b06..4bda7d19 100644 --- a/tests/XML/xenc/CipherDataTest.php +++ b/tests/XML/xenc/CipherDataTest.php @@ -4,15 +4,12 @@ namespace SimpleSAML\XMLSecurity\Test\XML\xenc; -use DOMDocument; use PHPUnit\Framework\TestCase; -use SimpleSAML\XML\Chunk; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\TestUtils\SchemaValidationTestTrait; use SimpleSAML\XML\TestUtils\SerializableElementTestTrait; use SimpleSAML\XMLSecurity\XML\xenc\CipherData; use SimpleSAML\XMLSecurity\XML\xenc\CipherValue; -use SimpleSAML\XMLSecurity\XMLSecurityDsig; use function dirname; use function strval; diff --git a/tests/XML/xenc/CipherValueTest.php b/tests/XML/xenc/CipherValueTest.php index ddb30a25..9c8ffad8 100644 --- a/tests/XML/xenc/CipherValueTest.php +++ b/tests/XML/xenc/CipherValueTest.php @@ -4,7 +4,6 @@ namespace SimpleSAML\XMLSecurity\Test\XML\xenc; -use DOMDocument; use PHPUnit\Framework\TestCase; use SimpleSAML\Assert\AssertionFailedException; use SimpleSAML\XML\DOMDocumentFactory; diff --git a/tests/XML/xenc/EncryptedDataTest.php b/tests/XML/xenc/EncryptedDataTest.php index 3b2446a2..7938a374 100644 --- a/tests/XML/xenc/EncryptedDataTest.php +++ b/tests/XML/xenc/EncryptedDataTest.php @@ -4,9 +4,7 @@ namespace SimpleSAML\XMLSecurity\Test\XML\xenc; -use DOMDocument; use PHPUnit\Framework\TestCase; -use SimpleSAML\XML\Chunk; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\TestUtils\SchemaValidationTestTrait; use SimpleSAML\XML\TestUtils\SerializableElementTestTrait; diff --git a/tests/XML/xenc/EncryptedKeyTest.php b/tests/XML/xenc/EncryptedKeyTest.php index 3c55ed1e..2e041f82 100644 --- a/tests/XML/xenc/EncryptedKeyTest.php +++ b/tests/XML/xenc/EncryptedKeyTest.php @@ -4,18 +4,16 @@ namespace SimpleSAML\XMLSecurity\Test\XML\xenc; -use DOMDocument; use PHPUnit\Framework\TestCase; -use SimpleSAML\XML\Chunk; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\TestUtils\SchemaValidationTestTrait; use SimpleSAML\XML\TestUtils\SerializableElementTestTrait; use SimpleSAML\XMLSecurity\Alg\KeyTransport\KeyTransportAlgorithmFactory; -use SimpleSAML\XMLSecurity\Alg\KeyTransport\RSA; use SimpleSAML\XMLSecurity\Constants as C; use SimpleSAML\XMLSecurity\Key\PrivateKey; use SimpleSAML\XMLSecurity\Key\PublicKey; use SimpleSAML\XMLSecurity\Key\SymmetricKey; +use SimpleSAML\XMLSecurity\TestUtils\PEMCertificatesMock; use SimpleSAML\XMLSecurity\Utils\XPath; use SimpleSAML\XMLSecurity\XML\ds\KeyInfo; use SimpleSAML\XMLSecurity\XML\xenc\CarriedKeyName; @@ -25,7 +23,6 @@ use SimpleSAML\XMLSecurity\XML\xenc\EncryptedKey; use SimpleSAML\XMLSecurity\XML\xenc\EncryptionMethod; use SimpleSAML\XMLSecurity\XML\xenc\ReferenceList; -use SimpleSAML\XMLSecurity\TestUtils\PEMCertificatesMock; use function bin2hex; use function dirname; diff --git a/tests/XML/xenc/EncryptionMethodTest.php b/tests/XML/xenc/EncryptionMethodTest.php index 2328ffdf..12e2a63d 100644 --- a/tests/XML/xenc/EncryptionMethodTest.php +++ b/tests/XML/xenc/EncryptionMethodTest.php @@ -9,11 +9,11 @@ use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\Exception\MissingAttributeException; use SimpleSAML\XML\TestUtils\SerializableElementTestTrait; +use SimpleSAML\XMLSecurity\Constants as C; use SimpleSAML\XMLSecurity\Utils\XPath; use SimpleSAML\XMLSecurity\XML\xenc\EncryptionMethod; use SimpleSAML\XMLSecurity\XML\xenc\KeySize; use SimpleSAML\XMLSecurity\XML\xenc\OAEPparams; -use SimpleSAML\XMLSecurity\Constants as C; use function dirname; use function strval;