Skip to content

Commit

Permalink
fix(tests)
Browse files Browse the repository at this point in the history
  • Loading branch information
h4kuna committed Jul 16, 2024
1 parent 7ba58a8 commit 94560fd
Show file tree
Hide file tree
Showing 29 changed files with 446 additions and 147 deletions.
17 changes: 2 additions & 15 deletions tests/bootstrap.php
Original file line number Diff line number Diff line change
@@ -1,22 +1,9 @@
<?php declare(strict_types=1);

use h4kuna\Ares\Tests\UseStoredFile;

require_once __DIR__ . '/../vendor/autoload.php';

date_default_timezone_set('Europe/Prague');

function loadResult(string $name, object $save = null): \stdClass
{
$file = __DIR__ . "/fixtures/$name.json";
if ($save !== null) {
file_put_contents($file, json_encode($save, JSON_PRETTY_PRINT));
}

return json_decode(file_get_contents($file));
}


Tracy\Debugger::enable(false);

if (!defined('__PHPSTAN_RUNNING__')) {
Tester\Environment::setup();
}
6 changes: 3 additions & 3 deletions tests/fixtures/adis/CZ27082440.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
"isVatPayer": true,
"taxOfficeNumber": "13",
"address": {
"uliceCislo": "Jankovcova 1522\/53",
"castObce": "HOLE\u0160OVICE (PRAHA 7)",
"uliceCislo": "Jankovcova 1522/53",
"castObce": "HOLEŠOVICE (PRAHA 7)",
"mesto": "PRAHA 7",
"psc": "17000",
"stat": "\u010cesk\u00e1 republika"
"stat": "Česká republika"
}
}
8 changes: 4 additions & 4 deletions tests/fixtures/adis/CZ8612301071.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
"isVatPayer": true,
"taxOfficeNumber": "452",
"address": {
"uliceCislo": "Dubov\u00e1 765",
"castObce": "DOLN\u00cd BOUSOV",
"mesto": "DOLN\u00cd BOUSOV",
"uliceCislo": "Dubová 765",
"castObce": "DOLNÍ BOUSOV",
"mesto": "DOLNÍ BOUSOV",
"psc": "29404",
"stat": "\u010cesk\u00e1 republika"
"stat": "Česká republika"
}
}
6 changes: 3 additions & 3 deletions tests/fixtures/adis/CZ8702080024.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
"isVatPayer": false,
"taxOfficeNumber": "452",
"address": {
"uliceCislo": "Na Dlaskov\u011b 94",
"uliceCislo": "Na Dlaskově 94",
"castObce": "BRTNICE",
"mesto": "VELK\u00c9 POPOVICE",
"mesto": "VELKÉ POPOVICE",
"psc": "25169",
"stat": "\u010cesk\u00e1 republika"
"stat": "Česká republika"
}
}
8 changes: 4 additions & 4 deletions tests/fixtures/ares/02445344.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@
"company": "Skanska Residential a.s.",
"created": "2014-01-01T00:00:00+01:00",
"dissolved": null,
"city_district": "Karl\u00edn",
"city_district": "Karlín",
"city_post": "Praha 8",
"in": "02445344",
"is_person": false,
"legal_form_code": 121,
"house_number": "682\/34a",
"street": "K\u0159i\u017e\u00edkova",
"house_number": "682/34a",
"street": "Křižíkova",
"district": null,
"tin": "CZ699004845",
"vat_payer": true,
"zip": "18600",
"country": "\u010cesk\u00e1 republika",
"country": "Česká republika",
"country_code": "CZ",
"nace": [
"431",
Expand Down
12 changes: 6 additions & 6 deletions tests/fixtures/ares/02491427.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
{
"active": true,
"city": "P\u00edsek",
"company": "Z\u00e1pado\u010desk\u00e1 spole\u010dnost, o.s.",
"city": "Písek",
"company": "Západočeská společnost, o.s.",
"created": "2013-12-27T00:00:00+01:00",
"dissolved": null,
"city_district": "Bud\u011bjovick\u00e9 P\u0159edm\u011bst\u00ed",
"city_district": "Budějovické Předměstí",
"city_post": null,
"in": "02491427",
"is_person": false,
"legal_form_code": 706,
"house_number": "105\/4",
"house_number": "105/4",
"street": "Budovcova",
"district": "P\u00edsek",
"district": "Písek",
"tin": null,
"vat_payer": false,
"zip": "39701",
"country": "\u010cesk\u00e1 republika",
"country": "Česká republika",
"country_code": "CZ",
"nace": [
"9499"
Expand Down
10 changes: 5 additions & 5 deletions tests/fixtures/ares/05560438.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"active": true,
"city": "Velk\u00e9 Popovice",
"company": "Ond\u0159ej Soch\u016frek",
"city": "Velké Popovice",
"company": "Ondřej Sochůrek",
"created": "2016-11-11T00:00:00+01:00",
"dissolved": null,
"city_district": "Brtnice",
Expand All @@ -10,12 +10,12 @@
"is_person": true,
"legal_form_code": 101,
"house_number": "94",
"street": "Na Dlaskov\u011b",
"district": "Praha-v\u00fdchod",
"street": "Na Dlaskově",
"district": "Praha-východ",
"tin": "CZ8702080024",
"vat_payer": false,
"zip": "25169",
"country": "\u010cesk\u00e1 republika",
"country": "Česká republika",
"country_code": "CZ",
"nace": [
"620",
Expand Down
12 changes: 6 additions & 6 deletions tests/fixtures/ares/08975884.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
{
"active": true,
"city": "Liberec",
"company": "Martin Proch\u00e1zka",
"company": "Martin Procházka",
"created": "2020-02-21T00:00:00+01:00",
"dissolved": null,
"city_district": "Liberec XII-Star\u00e9 Pavlovice",
"city_post": "Liberec (ne\u010dlen\u011bn\u00e9 m\u011bsto)",
"city_district": "Liberec XII-Staré Pavlovice",
"city_post": "Liberec (nečleněné město)",
"in": "08975884",
"is_person": true,
"legal_form_code": 101,
"house_number": "530\/41",
"street": "Letn\u00e1",
"house_number": "530/41",
"street": "Letná",
"district": "Liberec",
"tin": null,
"vat_payer": false,
"zip": "46001",
"country": "\u010cesk\u00e1 republika",
"country": "Česká republika",
"country_code": "CZ",
"nace": [
"620"
Expand Down
12 changes: 6 additions & 6 deletions tests/fixtures/ares/16415345.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
{
"active": true,
"city": "Liberec",
"company": "Roman Koreck\u00fd",
"company": "Roman Korecký",
"created": "1993-02-18T00:00:00+01:00",
"dissolved": null,
"city_district": "Liberec I-Star\u00e9 M\u011bsto",
"city_post": "Liberec (ne\u010dlen\u011bn\u00e9 m\u011bsto)",
"city_district": "Liberec I-Staré Město",
"city_post": "Liberec (nečleněné město)",
"in": "16415345",
"is_person": true,
"legal_form_code": 101,
"house_number": "319\/16a",
"street": "Ruprechtick\u00e1",
"house_number": "319/16a",
"street": "Ruprechtická",
"district": "Liberec",
"tin": "CZ6207141193",
"vat_payer": false,
"zip": "46001",
"country": "\u010cesk\u00e1 republika",
"country": "Česká republika",
"country_code": "CZ",
"nace": [
"55",
Expand Down
10 changes: 5 additions & 5 deletions tests/fixtures/ares/25110161.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
{
"active": true,
"city": "Praha",
"company": "Kaufland \u010cesk\u00e1 republika v.o.s.",
"company": "Kaufland Česká republika v.o.s.",
"created": "1997-03-10T00:00:00+01:00",
"dissolved": null,
"city_district": "B\u0159evnov",
"city_district": "Břevnov",
"city_post": "Praha 6",
"in": "25110161",
"is_person": false,
"legal_form_code": 111,
"house_number": "2428\/203",
"street": "B\u011blohorsk\u00e1",
"house_number": "2428/203",
"street": "Bělohorská",
"district": null,
"tin": "CZ25110161",
"vat_payer": true,
"zip": "16900",
"country": "\u010cesk\u00e1 republika",
"country": "Česká republika",
"country_code": "CZ",
"nace": [
"74",
Expand Down
36 changes: 0 additions & 36 deletions tests/fixtures/ares/25596641.json

This file was deleted.

6 changes: 3 additions & 3 deletions tests/fixtures/ares/26713250.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@
"company": "BARVY FRAMAR s.r.o.",
"created": "2002-08-03T00:00:00+02:00",
"dissolved": null,
"city_district": "Mod\u0159any",
"city_district": "Modřany",
"city_post": "Praha 12",
"in": "26713250",
"is_person": false,
"legal_form_code": 112,
"house_number": "1213\/4",
"house_number": "1213/4",
"street": "Barrandova",
"district": null,
"tin": "CZ26713250",
"vat_payer": true,
"zip": "14300",
"country": "\u010cesk\u00e1 republika",
"country": "Česká republika",
"country_code": "CZ",
"nace": [
"433",
Expand Down
6 changes: 3 additions & 3 deletions tests/fixtures/ares/27082440.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@
"company": "Alza.cz a.s.",
"created": "2003-08-26T00:00:00+02:00",
"dissolved": null,
"city_district": "Hole\u0161ovice",
"city_district": "Holešovice",
"city_post": "Praha 7",
"in": "27082440",
"is_person": false,
"legal_form_code": 121,
"house_number": "1522\/53",
"house_number": "1522/53",
"street": "Jankovcova",
"district": null,
"tin": "CZ27082440",
"vat_payer": true,
"zip": "17000",
"country": "\u010cesk\u00e1 republika",
"country": "Česká republika",
"country_code": "CZ",
"nace": [
"461",
Expand Down
12 changes: 6 additions & 6 deletions tests/fixtures/ares/27735753.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
{
"active": true,
"city": "Plze\u0148",
"city": "Plzeň",
"company": "Yaroslav Boychuk",
"created": null,
"dissolved": null,
"city_district": "Lobzy",
"city_post": "Plze\u0148 4",
"city_post": "Plzeň 4",
"in": "27735753",
"is_person": true,
"legal_form_code": 101,
"house_number": "805\/12",
"street": "Partyz\u00e1nsk\u00e1",
"district": "Plze\u0148-m\u011bsto",
"house_number": "805/12",
"street": "Partyzánská",
"district": "Plzeň-město",
"tin": "CZ8305253869",
"vat_payer": true,
"zip": "31200",
"country": "\u010cesk\u00e1 republika",
"country": "Česká republika",
"country_code": "CZ",
"nace": [
"00",
Expand Down
6 changes: 3 additions & 3 deletions tests/fixtures/ares/49240901.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
"in": "49240901",
"is_person": false,
"legal_form_code": 121,
"house_number": "1716\/2b",
"street": "Hv\u011bzdova",
"house_number": "1716/2b",
"street": "Hvězdova",
"district": null,
"tin": "CZ699003154",
"vat_payer": true,
"zip": "14000",
"country": "\u010cesk\u00e1 republika",
"country": "Česká republika",
"country_code": "CZ",
"nace": [
"64190"
Expand Down
4 changes: 2 additions & 2 deletions tests/fixtures/ares/49812670.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"company": "H. A. C. spol. s r.o.",
"created": "1993-09-06T00:00:00+02:00",
"dissolved": null,
"city_district": "Semt\u00edn",
"city_district": "Semtín",
"city_post": "Pardubice VII",
"in": "49812670",
"is_person": false,
Expand All @@ -15,7 +15,7 @@
"tin": "CZ49812670",
"vat_payer": true,
"zip": "53353",
"country": "\u010cesk\u00e1 republika",
"country": "Česká republika",
"country_code": "CZ",
"nace": [
"74",
Expand Down
Loading

0 comments on commit 94560fd

Please sign in to comment.