From e627c09ef0990c6abea5e5a64473d7936b017a82 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Sat, 18 May 2024 23:04:53 +1000 Subject: [PATCH] Fact1 tests --- tests/Integration/Einvoice/FACT1Test.php | 73 +++++++++++++++++++ .../Integration/Einvoice/samples/fact1.xml | 0 2 files changed, 73 insertions(+) create mode 100644 tests/Integration/Einvoice/FACT1Test.php rename app/Services/EDocument/Samples/ro.xml => tests/Integration/Einvoice/samples/fact1.xml (100%) diff --git a/tests/Integration/Einvoice/FACT1Test.php b/tests/Integration/Einvoice/FACT1Test.php new file mode 100644 index 000000000000..11433b9beaa7 --- /dev/null +++ b/tests/Integration/Einvoice/FACT1Test.php @@ -0,0 +1,73 @@ +assertIsArray($rules); + + $payload = Invoice::from($payload)->toArray(); + nlog($payload); + $this->assertIsArray($payload); + + $validation_array = Invoice::validate($payload); + + $this->assertIsArray($validation_array); + + } catch(\Illuminate\Validation\ValidationException $e) { + + nlog($e->errors()); + } + + $this->assertIsArray($validation_array); + + } + + + } +} \ No newline at end of file diff --git a/app/Services/EDocument/Samples/ro.xml b/tests/Integration/Einvoice/samples/fact1.xml similarity index 100% rename from app/Services/EDocument/Samples/ro.xml rename to tests/Integration/Einvoice/samples/fact1.xml