diff --git a/tests/Unit/Xml/DecisionNfseBuilderTest.php b/tests/Unit/Xml/DecisionNfseBuilderTest.php index 6b59472..6a40149 100644 --- a/tests/Unit/Xml/DecisionNfseBuilderTest.php +++ b/tests/Unit/Xml/DecisionNfseBuilderTest.php @@ -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 = ''; + + self::assertNotSame([], (new NfseSchemaValidator())->validate($xml)); + } + public function testKnownAccessKeyCheckDigit(): void { $key = '35503081206169966000133000000000023726079719343785';