Example #1
0
 public function testValidarComErro()
 {
     try {
         $xml = file_get_contents(__DIR__ . '/utils/usuario_err.xml');
         $schema = __DIR__ . '/utils/schema.xsd';
         $this->assertNull(Validar::validar($xml, $schema), 'Nao deveria passar aki');
     } catch (Exception $e) {
         $this->assertTrue(true, $e->getMessage());
     }
 }
Example #2
0
File: NFe.php Project: phpnfe/nfe
 public function validar($xml, $versao)
 {
     $nome = $this->identificaXML($xml);
     $path = __DIR__ . '/schemes/PL_008i2/' . $nome . '_v' . $versao . '.xsd';
     return Validar::validar($xml, $path);
 }