mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Fixes for tests
This commit is contained in:
parent
56ad60afb0
commit
4b546bb206
8
composer.lock
generated
8
composer.lock
generated
@ -5076,12 +5076,12 @@
|
|||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/invoiceninja/einvoice.git",
|
"url": "https://github.com/invoiceninja/einvoice.git",
|
||||||
"reference": "5ada5e64ee84137dbd5736e4b1c8da7661a8dc97"
|
"reference": "dd2a36b9efce85cf58d3bb1d718d75f2395c8761"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/invoiceninja/einvoice/zipball/5ada5e64ee84137dbd5736e4b1c8da7661a8dc97",
|
"url": "https://api.github.com/repos/invoiceninja/einvoice/zipball/dd2a36b9efce85cf58d3bb1d718d75f2395c8761",
|
||||||
"reference": "5ada5e64ee84137dbd5736e4b1c8da7661a8dc97",
|
"reference": "dd2a36b9efce85cf58d3bb1d718d75f2395c8761",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@ -5123,7 +5123,7 @@
|
|||||||
"source": "https://github.com/invoiceninja/einvoice/tree/main",
|
"source": "https://github.com/invoiceninja/einvoice/tree/main",
|
||||||
"issues": "https://github.com/invoiceninja/einvoice/issues"
|
"issues": "https://github.com/invoiceninja/einvoice/issues"
|
||||||
},
|
},
|
||||||
"time": "2024-06-07T01:16:28+00:00"
|
"time": "2024-06-07T02:01:13+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "invoiceninja/inspector",
|
"name": "invoiceninja/inspector",
|
||||||
|
@ -126,20 +126,25 @@ class FatturaPATest extends TestCase
|
|||||||
$this->assertInstanceOf(FatturaElettronicaBody::class, $fe->FatturaElettronicaBody[0]);
|
$this->assertInstanceOf(FatturaElettronicaBody::class, $fe->FatturaElettronicaBody[0]);
|
||||||
$this->assertInstanceOf(FatturaElettronicaHeader::class, $fe->FatturaElettronicaHeader);
|
$this->assertInstanceOf(FatturaElettronicaHeader::class, $fe->FatturaElettronicaHeader);
|
||||||
|
|
||||||
|
|
||||||
$e = new EInvoice;
|
$e = new EInvoice;
|
||||||
$errors = $e->validate($fe);
|
$errors = $e->validate($fe);
|
||||||
|
|
||||||
if(count($errors) > 0)
|
if(count($errors) > 0)
|
||||||
nlog($errors);
|
nlog($errors);
|
||||||
|
|
||||||
$this->assertCount(0, $errors);
|
$this->assertCount(0, $errors);
|
||||||
|
|
||||||
$encoder = new Encode($fe);
|
$xml = $e->encode($fe, 'xml');
|
||||||
$xml = $encoder->toXml();
|
|
||||||
|
|
||||||
$this->assertNotNull($xml);
|
$this->assertNotNull($xml);
|
||||||
|
|
||||||
|
nlog($xml);
|
||||||
|
|
||||||
|
$json = $e->encode($fe, 'json');
|
||||||
|
$this->assertNotNull($json);
|
||||||
|
nlog($json);
|
||||||
|
|
||||||
|
$decode = $e->decode('FatturaPA', $json, 'json');
|
||||||
|
|
||||||
|
$this->assertInstanceOf(FatturaElettronica::class, $decode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user