From c8adae7458d943eed09dc6e92cad87d40ed1b6e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20Tegn=C3=A9r?= Date: Fri, 15 Dec 2023 16:55:35 +0100 Subject: [PATCH] fix: Fixed test issue (lazy move class inside test file and updated phpunit xml). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Johannes Tegnér --- phpunit.xml.dist | 2 +- tests/OrgNrData.php | 23 ----------------------- tests/OrganisationsnummerTest.php | 22 +++++++++++++++++++++- 3 files changed, 22 insertions(+), 25 deletions(-) delete mode 100644 tests/OrgNrData.php diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 2298f7f..712bf70 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -8,7 +8,7 @@ - ./app + ./src diff --git a/tests/OrgNrData.php b/tests/OrgNrData.php deleted file mode 100644 index ff0ff5e..0000000 --- a/tests/OrgNrData.php +++ /dev/null @@ -1,23 +0,0 @@ -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; -} diff --git a/tests/OrganisationsnummerTest.php b/tests/OrganisationsnummerTest.php index ce16784..4693ce2 100644 --- a/tests/OrganisationsnummerTest.php +++ b/tests/OrganisationsnummerTest.php @@ -1,4 +1,4 @@ -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; +}