Skip to content

Commit 55671b5

Browse files
committed
Added delivery test
1 parent 382cdbd commit 55671b5

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

tests/DaDataAddressTest.php

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,39 @@ public function testGetPostalUnitByGeoCoorinates()
9595
);
9696
}
9797

98+
/**
99+
* @test
100+
*/
101+
public function testDeliveryAddress()
102+
{
103+
$this->assertSame(
104+
DaDataAddress::delivery('3100400100000'),
105+
$this->DeliveryProvider()
106+
);
107+
}
108+
109+
/**
110+
* @return array
111+
*/
112+
public function DeliveryProvider() : array
113+
{
114+
return [
115+
"suggestions" => [
116+
[
117+
"value" => "3100400100000",
118+
"unrestricted_value" => "fe7eea4a-875a-4235-aa61-81c2a37a0440",
119+
"data" => [
120+
"kladr_id" => "3100400100000",
121+
"fias_id" => "fe7eea4a-875a-4235-aa61-81c2a37a0440",
122+
"boxberry_id" => "01929",
123+
"cdek_id" => "344",
124+
"dpd_id" => "196006461",
125+
]
126+
]
127+
]
128+
];
129+
}
130+
98131
/**
99132
* @return array|\array[][]
100133
*/

0 commit comments

Comments
 (0)