From 4a972b3cf25258b9c425421a2ff53ca26228c87e Mon Sep 17 00:00:00 2001 From: Andrea Pollastri Date: Mon, 13 Nov 2023 15:31:46 +0100 Subject: [PATCH] Fix --- .github/workflows/lint.yml | 39 --------------------------------- .php_cs | 13 ----------- .phpunit.result.cache | 2 +- tests/CedentePrestatoreTest.php | 23 +++++++++++++++++++ 4 files changed, 24 insertions(+), 53 deletions(-) delete mode 100644 .github/workflows/lint.yml delete mode 100644 .php_cs create mode 100644 tests/CedentePrestatoreTest.php diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml deleted file mode 100644 index 8e4dd69..0000000 --- a/.github/workflows/lint.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: Lint - -on: - push: - branches: ["*"] - pull_request: - branches: ["*"] - -jobs: - build: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - php-versions: [8.0", "8.1", "8.2"] - - steps: - - uses: actions/checkout@v2 - - - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php-versions }} - - - name: Cache Composer dependencies - uses: actions/cache@v2 - with: - path: /tmp/composer-cache - key: ${{ runner.os }}-php${{ matrix.php-versions }}-${{ hashFiles('**/composer.lock') }} - - - name: Install dependencies - uses: php-actions/composer@v5 - with: - command: install - args: --prefer-dist --no-progress --no-suggest --verbose - php_version: ${{ matrix.php-versions }} - version: 1 - - - name: Run lint - run: make lint diff --git a/.php_cs b/.php_cs deleted file mode 100644 index ea44de8..0000000 --- a/.php_cs +++ /dev/null @@ -1,13 +0,0 @@ -in(__DIR__ . '/src') - ->in(__DIR__ . '/tests'); - -return PhpCsFixer\Config::create() - ->setUsingCache(false) - ->setRules([ - '@PSR2' => true, - 'array_syntax' => ['syntax' => 'short'], - ]) - ->setFinder($finder); diff --git a/.phpunit.result.cache b/.phpunit.result.cache index a0a8c40..a66bd71 100644 --- a/.phpunit.result.cache +++ b/.phpunit.result.cache @@ -1 +1 @@ -{"version":1,"defects":{"Axiostudio\\FatturaElettronica\\Tests\\AnagraficaTest::testConstructorWithNullValues":4},"times":{"Axiostudio\\FatturaElettronica\\Tests\\AnagraficaTest::testConstructor":0.002,"Axiostudio\\FatturaElettronica\\Tests\\AnagraficaTest::testConstructorWithNullValues":0.001}} \ No newline at end of file +{"version":1,"defects":{"Axiostudio\\FatturaElettronica\\Tests\\AnagraficaTest::testConstructorWithNullValues":4,"Tests\\Axiostudio\\FatturaElettronica\\Models\\CedentePrestatoreTest::testConstructor":4},"times":{"Axiostudio\\FatturaElettronica\\Tests\\AnagraficaTest::testConstructor":0.005,"Axiostudio\\FatturaElettronica\\Tests\\AnagraficaTest::testConstructorWithNullValues":0.001,"Tests\\Axiostudio\\FatturaElettronica\\Models\\CedentePrestatoreTest::testConstructor":0.002}} \ No newline at end of file diff --git a/tests/CedentePrestatoreTest.php b/tests/CedentePrestatoreTest.php new file mode 100644 index 0000000..e125edf --- /dev/null +++ b/tests/CedentePrestatoreTest.php @@ -0,0 +1,23 @@ +assertInstanceOf(CedentePrestatore::class, $cedentePrestatore); + $this->assertInstanceOf(DatiAnagrafici::class, $cedentePrestatore->DatiAnagrafici); + $this->assertInstanceOf(Sede::class, $cedentePrestatore->Sede); + } +}