File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66
77use DOMDocument ;
88use PHPUnit \Framework \TestCase ;
9+ use SimpleSAML \Test \XML \SerializableXMLTestTrait ;
910use SimpleSAML \XML \DOMDocumentFactory ;
1011use SimpleSAML \XML \Chunk ;
1112use SimpleSAML \XMLSecurity \Test \XML \CustomSignable ;
1920 */
2021final class SignableElementTest extends TestCase
2122{
22- /** @var \DOMDocument */
23- private DOMDocument $ document ;
23+ use SerializableXMLTestTrait;
2424
2525
2626 /**
2727 */
2828 public function setUp (): void
2929 {
30- $ this ->document = DOMDocumentFactory::fromFile (
30+ $ this ->xmlRepresentation = DOMDocumentFactory::fromFile (
3131 dirname (dirname (__FILE__ )) . '/resources/xml/custom_CustomSignable.xml '
3232 );
3333 }
@@ -64,18 +64,6 @@ public function testUnmarshalling(): void
6464 'Chunk ' ,
6565 $ customSignableElement ->textContent
6666 );
67- }
68-
69-
70- /**
71- * Test serialization / unserialization
72- */
73- public function testSerialization (): void
74- {
75- $ this ->assertEquals (
76- $ this ->document ->saveXML ($ this ->document ->documentElement ),
77- strval (unserialize (serialize (CustomSignable::fromXML ($ this ->document ->documentElement ))))
78- );
7967 }
8068}
8169
You can’t perform that action at this time.
0 commit comments