Skip to content

Commit

Permalink
added cxml dtd 1.2.063
Browse files Browse the repository at this point in the history
  • Loading branch information
mathielen committed Sep 11, 2024
1 parent 8a14ffd commit 0a051bd
Show file tree
Hide file tree
Showing 5 changed files with 28,939 additions and 4 deletions.
5 changes: 4 additions & 1 deletion src/CXml/Serializer.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@

readonly class Serializer
{

public const DOC_TYPE_VERSION = '1.2.063';

private function __construct(private SerializerInterface $jmsSerializer)
{
}
Expand Down Expand Up @@ -69,7 +72,7 @@ public function deserialize(string $xml): CXml
return $this->jmsSerializer->deserialize($xml, CXml::class, 'xml');
}

public function serialize(CXml $cxml, string $docTypeVersion = '1.2.054'): string
public function serialize(CXml $cxml, string $docTypeVersion = self::DOC_TYPE_VERSION): string
{
$xml = $this->jmsSerializer->serialize($cxml, 'xml');

Expand Down
6 changes: 3 additions & 3 deletions tests/CXmlTest/Validation/MessageValidatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ final class MessageValidatorTest extends TestCase

protected function setUp(): void
{
$this->dtdValidator = new DtdValidator(__DIR__ . '/../../metadata/cxml/dtd/1.2.050');
$this->dtdValidator = new DtdValidator(__DIR__ . '/../../metadata/cxml/dtd/1.2.063');
}

public function testValidateSuccess(): void
public function testValidateProfileRequestSuccess(): void
{
$this->expectNotToPerformAssertions();

$xml = file_get_contents('tests/metadata/cxml/samples/simple-profile-request.xml');
$xml = file_get_contents(__DIR__ . '/../../metadata/cxml/samples/simple-profile-request.xml');
$this->dtdValidator->validateAgainstDtd($xml);
}

Expand Down
Loading

0 comments on commit 0a051bd

Please sign in to comment.