Skip to content

Commit

Permalink
fix: Fixed test issue (lazy move class inside test file and updated p…
Browse files Browse the repository at this point in the history
…hpunit xml).

Signed-off-by: Johannes Tegnér <[email protected]>
  • Loading branch information
Johannestegner committed Dec 15, 2023
1 parent ad83dcb commit c8adae7
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 25 deletions.
2 changes: 1 addition & 1 deletion phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</testsuites>
<source>
<include>
<directory suffix=".php">./app</directory>
<directory suffix=".php">./src</directory>
</include>
</source>
</phpunit>
23 changes: 0 additions & 23 deletions tests/OrgNrData.php

This file was deleted.

22 changes: 21 additions & 1 deletion tests/OrganisationsnummerTest.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php /** @noinspection ALL */

namespace Organisationsnummer\Tests;

Expand Down Expand Up @@ -101,3 +101,23 @@ public function testWithPersonnummer(string $input): void
self::assertTrue($nr->isPersonnummer());
}
}

class OrgNrData
{
public function __construct(array $o)
{
$this->input = $o['input'];
$this->longFormat = $o['long_format'];
$this->shortFormat = $o['short_format'];
$this->valid = $o['valid'];
$this->type = $o['type'];
$this->vatNumber = $o['vat_number'];
}

public string $input;
public string $longFormat;
public string $shortFormat;
public bool $valid;
public string $type;
public string $vatNumber;
}

0 comments on commit c8adae7

Please sign in to comment.