for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace SimpleSAML\XMLSecurity\Test\XML\ds;
use PHPUnit\Framework\TestCase;
use SimpleSAML\XML\DOMDocumentFactory;
use SimpleSAML\XML\TestUtils\SerializableElementTestTrait;
use SimpleSAML\XMLSecurity\XML\ds\X509SubjectName;
use function dirname;
use function strval;
/**
* Class \SimpleSAML\XMLSecurity\Test\XML\ds\X509SubjectNameTest
*
* @covers \SimpleSAML\XMLSecurity\XML\ds\AbstractDsElement
* @covers \SimpleSAML\XMLSecurity\XML\ds\X509SubjectName
* @package simplesamlphp/xml-security
*/
final class X509SubjectNameTest extends TestCase
{
use SerializableElementTestTrait;
SimpleSAML\XML\TestUtils...lizableElementTestTrait
$documentElement
SimpleSAML\XMLSecurity\T...\ds\X509SubjectNameTest
public static function setUpBeforeClass(): void
self::$testedClass = X509SubjectName::class;
self::$xmlRepresentation = DOMDocumentFactory::fromFile(
dirname(__FILE__, 3) . '/resources/xml/ds_X509SubjectName.xml',
);
}
public function testMarshalling(): void
$subjectName = new X509SubjectName('some name');
$this->assertEquals(
self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement),
strval($subjectName),