-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathTrackTraceUrlTest.php
42 lines (36 loc) · 1.01 KB
/
TrackTraceUrlTest.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?php
declare(strict_types=1);
namespace MyParcelNL\Sdk\Test\Helper;
use MyParcelNL\Sdk\src\Helper\TrackTraceUrl;
use MyParcelNL\Sdk\Test\Bootstrap\TestCase;
class TrackTraceUrlTest extends TestCase
{
/**
* @return array
*/
public static function provideTrackTraceData(): array
{
return [
'dutch destination' => [
'barcode' => '3SMYPA00123456',
'postalCode' => '2132JE',
'countryCode' => 'NL',
],
];
}
/**
* @dataProvider provideTrackTraceData()
*
* @param string $barcode
* @param string $postalCode
* @param string $countryCode
*/
public function testCreate(string $barcode, string $postalCode, string $countryCode): void
{
$trackTraceUrl = TrackTraceUrl::create($barcode, $postalCode, $countryCode);
self::assertSame(
"https://myparcel.me/track-trace/$barcode/$postalCode/$countryCode",
$trackTraceUrl
);
}
}