-
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
1 parent
8c16121
commit 15e8428
Showing
17 changed files
with
415 additions
and
157 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,30 +3,31 @@ | |
declare(strict_types=1); | ||
|
||
/* | ||
* This file is part of PHP CS Fixer. | ||
* | ||
* (c) Fabien Potencier <[email protected]> | ||
* Dariusz Rumiński <[email protected]> | ||
* | ||
* This source file is subject to the MIT license that is bundled | ||
* with this source code in the file LICENSE. | ||
*/ | ||
* This file is part of PHP CS Fixer. | ||
* | ||
* (c) Fabien Potencier <[email protected]> | ||
* Dariusz Rumiński <[email protected]> | ||
* | ||
* This source file is subject to the MIT license that is bundled | ||
* with this source code in the file LICENSE. | ||
*/ | ||
|
||
$header = <<<'EOF' | ||
This file is part of PHP CS Fixer. | ||
This file is part of PHP CS Fixer. | ||
(c) Fabien Potencier <[email protected]> | ||
Dariusz Rumiński <[email protected]> | ||
(c) Fabien Potencier <[email protected]> | ||
Dariusz Rumiński <[email protected]> | ||
This source file is subject to the MIT license that is bundled | ||
with this source code in the file LICENSE. | ||
EOF; | ||
This source file is subject to the MIT license that is bundled | ||
with this source code in the file LICENSE. | ||
EOF; | ||
|
||
$finder = (new PhpCsFixer\Finder()) | ||
->ignoreDotFiles(false) | ||
->ignoreVCSIgnored(true) | ||
->exclude(['dev-tools/phpstan', 'tests/Fixtures']) | ||
->in(__DIR__); | ||
->in(__DIR__) | ||
; | ||
|
||
return (new PhpCsFixer\Config()) | ||
->setRiskyAllowed(true) | ||
|
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 |
---|---|---|
@@ -1,6 +1,18 @@ | ||
<?php | ||
|
||
require('vendor/autoload.php'); | ||
declare(strict_types=1); | ||
|
||
/* | ||
* This file is part of PHP CS Fixer. | ||
* | ||
* (c) Fabien Potencier <[email protected]> | ||
* Dariusz Rumiński <[email protected]> | ||
* | ||
* This source file is subject to the MIT license that is bundled | ||
* with this source code in the file LICENSE. | ||
*/ | ||
|
||
require 'vendor/autoload.php'; | ||
|
||
use Axiostudio\FatturaElettronica\FatturaElettronica; | ||
|
||
|
@@ -21,7 +33,7 @@ | |
$header = [ | ||
$datiTrasmissione, | ||
$cedentePrestatore, | ||
$cessionarioCommittente | ||
$cessionarioCommittente, | ||
]; | ||
|
||
$datiGeneraliDocumento = ['123', '2021-01-01', '345.22']; | ||
|
@@ -34,7 +46,7 @@ | |
|
||
$body = [ | ||
$datiGenerali, | ||
$datiDatiPagamento | ||
$datiDatiPagamento, | ||
]; | ||
|
||
$dettaglioLinee = [ | ||
|
@@ -54,9 +66,9 @@ | |
|
||
var_dump($datiXml); | ||
|
||
/* | ||
/* | ||
$data = [ | ||
'FatturaElettronicaBody' => [ | ||
'DatiGenerali' => [ | ||
'DatiGeneraliDocumento' => [ | ||
|
@@ -101,4 +113,4 @@ | |
] | ||
] | ||
]; | ||
*/ | ||
*/ |
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 |
---|---|---|
@@ -1,11 +1,28 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/* | ||
* This file is part of PHP CS Fixer. | ||
* | ||
* (c) Fabien Potencier <[email protected]> | ||
* Dariusz Rumiński <[email protected]> | ||
* | ||
* This source file is subject to the MIT license that is bundled | ||
* with this source code in the file LICENSE. | ||
*/ | ||
|
||
namespace Axiostudio\FatturaElettronica\Tests; | ||
|
||
use Axiostudio\FatturaElettronica\Models\Anagrafica; | ||
use PHPUnit\Framework\TestCase; | ||
|
||
class AnagraficaTest extends TestCase | ||
/** | ||
* @internal | ||
* | ||
* @coversNothing | ||
*/ | ||
final class AnagraficaTest extends TestCase | ||
{ | ||
public function testConstructor(): void | ||
{ | ||
|
@@ -15,9 +32,9 @@ public function testConstructor(): void | |
|
||
$anagrafica = new Anagrafica($denominazione, $nome, $cognome); | ||
|
||
$this->assertInstanceOf(Anagrafica::class, $anagrafica); | ||
$this->assertEquals($denominazione, $anagrafica->Denominazione); | ||
$this->assertEquals($nome, $anagrafica->Nome); | ||
$this->assertEquals($cognome, $anagrafica->Cognome); | ||
self::assertInstanceOf(Anagrafica::class, $anagrafica); | ||
self::assertSame($denominazione, $anagrafica->Denominazione); | ||
self::assertSame($nome, $anagrafica->Nome); | ||
self::assertSame($cognome, $anagrafica->Cognome); | ||
} | ||
} |
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 |
---|---|---|
@@ -1,30 +1,46 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/* | ||
* This file is part of PHP CS Fixer. | ||
* | ||
* (c) Fabien Potencier <[email protected]> | ||
* Dariusz Rumiński <[email protected]> | ||
* | ||
* This source file is subject to the MIT license that is bundled | ||
* with this source code in the file LICENSE. | ||
*/ | ||
|
||
namespace Axiostudio\FatturaElettronica\Tests; | ||
|
||
use PHPUnit\Framework\TestCase; | ||
use Axiostudio\FatturaElettronica\Models\Sede; | ||
use Axiostudio\FatturaElettronica\Models\DatiAnagrafici; | ||
use Axiostudio\FatturaElettronica\Models\CedentePrestatore; | ||
use Axiostudio\FatturaElettronica\Models\DatiAnagrafici; | ||
use Axiostudio\FatturaElettronica\Models\Sede; | ||
use PHPUnit\Framework\TestCase; | ||
|
||
class CedentePrestatoreTest extends TestCase | ||
/** | ||
* @internal | ||
* | ||
* @coversNothing | ||
*/ | ||
final class CedentePrestatoreTest extends TestCase | ||
{ | ||
public function testConstructor(): void | ||
{ | ||
|
||
$DatiAnagrafici = ['Company Ltd', '0123456789']; | ||
$Sede = [ | ||
'Via Roma, 1', | ||
'00100', | ||
'Roma', | ||
'RM', | ||
'IT' | ||
'IT', | ||
]; | ||
|
||
$cedentePrestatore = new CedentePrestatore($DatiAnagrafici, $Sede); | ||
|
||
$this->assertInstanceOf(CedentePrestatore::class, $cedentePrestatore); | ||
$this->assertInstanceOf(DatiAnagrafici::class, $cedentePrestatore->DatiAnagrafici); | ||
$this->assertInstanceOf(Sede::class, $cedentePrestatore->Sede); | ||
self::assertInstanceOf(CedentePrestatore::class, $cedentePrestatore); | ||
self::assertInstanceOf(DatiAnagrafici::class, $cedentePrestatore->DatiAnagrafici); | ||
self::assertInstanceOf(Sede::class, $cedentePrestatore->Sede); | ||
} | ||
} |
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 |
---|---|---|
@@ -1,30 +1,46 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/* | ||
* This file is part of PHP CS Fixer. | ||
* | ||
* (c) Fabien Potencier <[email protected]> | ||
* Dariusz Rumiński <[email protected]> | ||
* | ||
* This source file is subject to the MIT license that is bundled | ||
* with this source code in the file LICENSE. | ||
*/ | ||
|
||
namespace Axiostudio\FatturaElettronica\Tests; | ||
|
||
use PHPUnit\Framework\TestCase; | ||
use Axiostudio\FatturaElettronica\Models\Sede; | ||
use Axiostudio\FatturaElettronica\Models\DatiAnagrafici; | ||
use Axiostudio\FatturaElettronica\Models\CessionarioCommittente; | ||
use Axiostudio\FatturaElettronica\Models\DatiAnagrafici; | ||
use Axiostudio\FatturaElettronica\Models\Sede; | ||
use PHPUnit\Framework\TestCase; | ||
|
||
class CessionarioCommittenteTest extends TestCase | ||
/** | ||
* @internal | ||
* | ||
* @coversNothing | ||
*/ | ||
final class CessionarioCommittente extends TestCase | ||
{ | ||
public function testConstructor(): void | ||
{ | ||
|
||
$DatiAnagrafici = ['Company Ltd', '0123456789']; | ||
$Sede = [ | ||
'Via Roma, 1', | ||
'00100', | ||
'Roma', | ||
'RM', | ||
'IT' | ||
'IT', | ||
]; | ||
|
||
$cedentePrestatore = new CessionarioCommittente($DatiAnagrafici, $Sede); | ||
$cedentePrestatore = new self($DatiAnagrafici, $Sede); | ||
|
||
$this->assertInstanceOf(CessionarioCommittente::class, $cedentePrestatore); | ||
$this->assertInstanceOf(DatiAnagrafici::class, $cedentePrestatore->DatiAnagrafici); | ||
$this->assertInstanceOf(Sede::class, $cedentePrestatore->Sede); | ||
self::assertInstanceOf(self::class, $cedentePrestatore); | ||
self::assertInstanceOf(DatiAnagrafici::class, $cedentePrestatore->DatiAnagrafici); | ||
self::assertInstanceOf(Sede::class, $cedentePrestatore->Sede); | ||
} | ||
} |
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 |
---|---|---|
@@ -1,13 +1,30 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/* | ||
* This file is part of PHP CS Fixer. | ||
* | ||
* (c) Fabien Potencier <[email protected]> | ||
* Dariusz Rumiński <[email protected]> | ||
* | ||
* This source file is subject to the MIT license that is bundled | ||
* with this source code in the file LICENSE. | ||
*/ | ||
|
||
namespace Axiostudio\FatturaElettronica\Tests; | ||
|
||
use Axiostudio\FatturaElettronica\Models\Anagrafica; | ||
use Axiostudio\FatturaElettronica\Models\DatiAnagrafici; | ||
use Axiostudio\FatturaElettronica\Models\Id; | ||
use Axiostudio\FatturaElettronica\Models\Anagrafica; | ||
use PHPUnit\Framework\TestCase; | ||
|
||
class DatiAnagraficiTest extends TestCase | ||
/** | ||
* @internal | ||
* | ||
* @coversNothing | ||
*/ | ||
final class DatiAnagraficiTest extends TestCase | ||
{ | ||
public function testConstructor(): void | ||
{ | ||
|
@@ -19,10 +36,10 @@ public function testConstructor(): void | |
|
||
$datiAnagrafici = new DatiAnagrafici($id, $anagrafica, $codiceFiscale, $regimeFiscale); | ||
|
||
$this->assertInstanceOf(DatiAnagrafici::class, $datiAnagrafici); | ||
$this->assertInstanceOf(Id::class, $datiAnagrafici->IdFiscaleIVA); | ||
$this->assertInstanceOf(Anagrafica::class, $datiAnagrafici->Anagrafica); | ||
$this->assertEquals($codiceFiscale, $datiAnagrafici->CodiceFiscale); | ||
$this->assertEquals($regimeFiscale, $datiAnagrafici->RegimeFiscale); | ||
self::assertInstanceOf(DatiAnagrafici::class, $datiAnagrafici); | ||
self::assertInstanceOf(Id::class, $datiAnagrafici->IdFiscaleIVA); | ||
self::assertInstanceOf(Anagrafica::class, $datiAnagrafici->Anagrafica); | ||
self::assertSame($codiceFiscale, $datiAnagrafici->CodiceFiscale); | ||
self::assertSame($regimeFiscale, $datiAnagrafici->RegimeFiscale); | ||
} | ||
} |
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 |
---|---|---|
@@ -1,17 +1,34 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/* | ||
* This file is part of PHP CS Fixer. | ||
* | ||
* (c) Fabien Potencier <[email protected]> | ||
* Dariusz Rumiński <[email protected]> | ||
* | ||
* This source file is subject to the MIT license that is bundled | ||
* with this source code in the file LICENSE. | ||
*/ | ||
|
||
namespace Axiostudio\FatturaElettronica\Tests; | ||
|
||
use Axiostudio\FatturaElettronica\Models\DatiBeniServizi; | ||
use PHPUnit\Framework\TestCase; | ||
|
||
class DatiBeniServiziTest extends TestCase | ||
/** | ||
* @internal | ||
* | ||
* @coversNothing | ||
*/ | ||
final class DatiBeniservizi extends TestCase | ||
{ | ||
public function testConstructor(): void | ||
{ | ||
$datiBeniServizi = new DatiBeniServizi(); | ||
$datiBeniServizi = new self(); | ||
|
||
$this->assertInstanceOf(DatiBeniServizi::class, $datiBeniServizi); | ||
$this->assertNull($datiBeniServizi->XmlDatiBeniServizi); | ||
self::assertInstanceOf(self::class, $datiBeniServizi); | ||
self::assertNull($datiBeniServizi->XmlDatiBeniServizi); | ||
} | ||
} |
Oops, something went wrong.