-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Andrea Pollastri
committed
Nov 13, 2023
1 parent
5489cd7
commit dd6c344
Showing
2 changed files
with
24 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?php | ||
|
||
namespace Axiostudio\FatturaElettronica\Tests; | ||
|
||
use Axiostudio\FatturaElettronica\Models\DatiRiepilogo; | ||
use PHPUnit\Framework\TestCase; | ||
|
||
class DatiRiepilogoTest extends TestCase | ||
{ | ||
public function testConstructorWithNatura(): void | ||
{ | ||
$imponibileImporto = 100.00; | ||
$aliquotaIVA = 22.00; | ||
$natura = 'N1'; | ||
|
||
$datiRiepilogo = new DatiRiepilogo($imponibileImporto, $aliquotaIVA, $natura); | ||
|
||
$this->assertInstanceOf(DatiRiepilogo::class, $datiRiepilogo); | ||
$this->assertEquals($imponibileImporto, $datiRiepilogo->ImponibileImporto); | ||
$this->assertEquals($aliquotaIVA, $datiRiepilogo->AliquotaIVA); | ||
$this->assertEquals($natura, $datiRiepilogo->Natura); | ||
$this->assertEquals($imponibileImporto * $aliquotaIVA / 100, $datiRiepilogo->Imposta); | ||
} | ||
} |