Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions tests/Unit/Xml/DecisionNfseBuilderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,21 @@ public function testManualNdfseZeroMakesSchemaConflictExplicit(): void
self::assertTrue((bool) array_filter($errors, static fn (string $e): bool => str_contains($e, 'nDFSe')));
}

public function testCompleteNfseValidatorRejectsUnsupportedSchemaVersionExplicitly(): void
{
$this->expectException(\InvalidArgumentException::class);
$this->expectExceptionMessage('Unsupported complete NFS-e schema version: 9.99');

new NfseSchemaValidator(schemaVersion: '9.99');
}

public function testCompleteNfseValidatorDoesNotResolveExternalEntities(): void
{
$xml = '<?xml version="1.0"?><!DOCTYPE NFSe SYSTEM "https://example.invalid/nfse.dtd"><NFSe/>';

self::assertNotSame([], (new NfseSchemaValidator())->validate($xml));
}

public function testKnownAccessKeyCheckDigit(): void
{
$key = '35503081206169966000133000000000023726079719343785';
Expand Down
Loading