1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
declare(strict_types=1); |
4
|
|
|
|
5
|
|
|
namespace SimpleSAML\Test\SAML2\XML\xenc11; |
6
|
|
|
|
7
|
|
|
use PHPUnit\Framework\Attributes\CoversClass; |
|
|
|
|
8
|
|
|
use PHPUnit\Framework\TestCase; |
9
|
|
|
use SimpleSAML\XML\DOMDocumentFactory; |
10
|
|
|
use SimpleSAML\XML\TestUtils\SchemaValidationTestTrait; |
11
|
|
|
use SimpleSAML\XML\TestUtils\SerializableElementTestTrait; |
12
|
|
|
use SimpleSAML\XMLSecurity\XML\xenc11\AbstractAlgorithmIdentifierType; |
13
|
|
|
use SimpleSAML\XMLSecurity\XML\xenc11\AbstractMGFType; |
14
|
|
|
use SimpleSAML\XMLSecurity\XML\xenc11\AbstractXenc11Element; |
15
|
|
|
use SimpleSAML\XMLSecurity\XML\xenc11\MGF; |
16
|
|
|
|
17
|
|
|
use function dirname; |
18
|
|
|
use function strval; |
19
|
|
|
|
20
|
|
|
/** |
21
|
|
|
* Class \SimpleSAML\XMLSecurity\XML\xenc11\MGFTest |
22
|
|
|
* |
23
|
|
|
* @package simplesamlphp/xml-security |
24
|
|
|
*/ |
25
|
|
|
#[CoversClass(MGF::class)] |
26
|
|
|
#[CoversClass(AbstractMGFType::class)] |
27
|
|
|
#[CoversClass(AbstractAlgorithmIdentifierType::class)] |
28
|
|
|
#[CoversClass(AbstractXenc11Element::class)] |
29
|
|
|
final class MGFTest extends TestCase |
30
|
|
|
{ |
31
|
|
|
use SchemaValidationTestTrait; |
|
|
|
|
32
|
|
|
use SerializableElementTestTrait; |
|
|
|
|
33
|
|
|
|
34
|
|
|
/** |
35
|
|
|
*/ |
36
|
|
|
public static function setUpBeforeClass(): void |
37
|
|
|
{ |
38
|
|
|
self::$testedClass = MGF::class; |
39
|
|
|
|
40
|
|
|
self::$schemaFile = dirname(__FILE__, 4) . '/resources/schemas/xenc-schema-11.xsd'; |
41
|
|
|
|
42
|
|
|
self::$xmlRepresentation = DOMDocumentFactory::fromFile( |
43
|
|
|
dirname(__FILE__, 3) . '/resources/xml/xenc11_MGF.xml', |
44
|
|
|
); |
45
|
|
|
} |
46
|
|
|
|
47
|
|
|
|
48
|
|
|
// marshalling |
49
|
|
|
|
50
|
|
|
|
51
|
|
|
/** |
52
|
|
|
*/ |
53
|
|
|
public function testMarshalling(): void |
54
|
|
|
{ |
55
|
|
|
$mgf = new MGF('urn:x-simplesamlphp:algorithm'); |
56
|
|
|
|
57
|
|
|
$this->assertEquals( |
58
|
|
|
self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), |
59
|
|
|
strval($mgf), |
60
|
|
|
); |
61
|
|
|
} |
62
|
|
|
} |
63
|
|
|
|
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths