diff --git a/app/Services/EDocument/Standards/Peppol.php b/app/Services/EDocument/Standards/Peppol.php index bce608b94c48..4dcbb5a46cb2 100644 --- a/app/Services/EDocument/Standards/Peppol.php +++ b/app/Services/EDocument/Standards/Peppol.php @@ -388,7 +388,11 @@ class Peppol extends AbstractService */ public function toObject(): mixed { - return json_decode($this->toJson()); + + $invoice = new \stdClass; + $invoice->Invoice = json_decode($this->toJson()); + return $invoice; + } /** diff --git a/phpunit.xml b/phpunit.xml index 1c27f29b2b43..d9b2e4a1cf3e 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -1,6 +1,6 @@ diff --git a/tests/TestCase.php b/tests/TestCase.php index 3f3e937bab2e..a9c24851b479 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -2,6 +2,7 @@ namespace Tests; +use Mockery; use App\Utils\Traits\AppSetup; use Illuminate\Foundation\Testing\TestCase as BaseTestCase; @@ -15,4 +16,5 @@ abstract class TestCase extends BaseTestCase parent::setUp(); } + }