Skip to content

Commit a61426a

Browse files
committed
fix: 🐛 support for new zip urls
1 parent 0329e86 commit a61426a

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

‎src/DataSource/ZipUrls.php‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
final readonly class ZipUrls
88
{
9-
public const string KEN_ALL = 'https://www.post.japanpost.jp/zipcode/dl/kogaki/zip/ken_all.zip';
10-
public const string KEN_ALL_ROME = 'https://www.post.japanpost.jp/zipcode/dl/roman/KEN_ALL_ROME.zip';
11-
public const string JIGYOSYO = 'https://www.post.japanpost.jp/zipcode/dl/jigyosyo/zip/jigyosyo.zip';
9+
public const string KEN_ALL = 'https://www.post.japanpost.jp/service/search/zipcode/download/kogaki/zip/ken_all.zip';
10+
public const string KEN_ALL_ROME = 'https://www.post.japanpost.jp/service/search/zipcode/download/roman/KEN_ALL_ROME.zip';
11+
public const string JIGYOSYO = 'https://www.post.japanpost.jp/service/search/zipcode/download/office/zip/jigyosyo.zip';
1212
}

‎tests/Command/BuildCommandTest.php‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ class BuildCommandTest extends TestCase
2222
public function testExecute(): void
2323
{
2424
$csvProvider = $this->prophesize(CsvProviderInterface::class);
25-
$csvProvider->fromZipUrl('https://www.post.japanpost.jp/zipcode/dl/kogaki/zip/ken_all.zip')->willReturn(Reader::createFromString('ken,all,csv'));
26-
$csvProvider->fromZipUrl('https://www.post.japanpost.jp/zipcode/dl/roman/KEN_ALL_ROME.zip')->willReturn(Reader::createFromString('kenall,rome,csv'));
27-
$csvProvider->fromZipUrl('https://www.post.japanpost.jp/zipcode/dl/jigyosyo/zip/jigyosyo.zip')->willReturn(Reader::createFromString('jigyo,syo,csv'));
25+
$csvProvider->fromZipUrl('https://www.post.japanpost.jp/service/search/zipcode/download/kogaki/zip/ken_all.zip')->willReturn(Reader::createFromString('ken,all,csv'));
26+
$csvProvider->fromZipUrl('https://www.post.japanpost.jp/service/search/zipcode/download/roman/KEN_ALL_ROME.zip')->willReturn(Reader::createFromString('kenall,rome,csv'));
27+
$csvProvider->fromZipUrl('https://www.post.japanpost.jp/service/search/zipcode/download/office/zip/jigyosyo.zip')->willReturn(Reader::createFromString('jigyo,syo,csv'));
2828

2929
$kenAllCsvParser = $this->prophesize(CsvParserInterface::class);
3030
$kenAllCsvParser->parse(['ken', 'all', 'csv'])->willReturn(new ParsedCsvRow(

0 commit comments

Comments
 (0)