Skip to content

Commit

Permalink
Fix Pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrea Pollastri committed Nov 13, 2023
1 parent cc3e1b4 commit 9d2fcd8
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 4 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@ jobs:
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo
coverage: none

- name: Setup problem matchers
run: |
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
- name: Install dependencies
run: composer update --${{ matrix.stability }} --prefer-dist --no-interaction

Expand Down
30 changes: 30 additions & 0 deletions tests/DatiAnagraficiTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?php

namespace Tests\Axiostudio\FatturaElettronica\Models;

use Axiostudio\FatturaElettronica\Models\DatiAnagrafici;
use Axiostudio\FatturaElettronica\Models\Id;
use Axiostudio\FatturaElettronica\Models\Anagrafica;
use Axiostudio\FatturaElettronica\Settings;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Validator\Validation;

class DatiAnagraficiTest extends TestCase
{
public function testConstructor(): void
{
$id = '0123456789';
$anagrafica = ['Company Ltd', 'John', 'Doe'];

$codiceFiscale = 'ABC123XYZ4567890';
$regimeFiscale = 'RegimeFiscaleValue';

$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);
}
}

0 comments on commit 9d2fcd8

Please sign in to comment.