-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathAddressSpec.php
More file actions
77 lines (71 loc) · 2.22 KB
/
AddressSpec.php
File metadata and controls
77 lines (71 loc) · 2.22 KB
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<?php
namespace spec\rosette\api;
use PhpSpec\ObjectBehavior;
use Prophecy\Argument;
class AddressSpec extends ObjectBehavior
{
public function it_should_except_with_no_address()
{
$this->beConstructedWith(null);
$this->shouldThrow('rosette\api\RosetteException')->duringInstantiation();
}
public function it_validates_arguments()
{
$house = 'house';
$houseNumber = 'houseNumber';
$road = 'road';
$unit = 'unit';
$level = 'level';
$staircase = 'staircase';
$entrance = 'entrance';
$suburb = 'suburb';
$cityDistrict = 'cityDistrict';
$city = 'city';
$island = 'island';
$stateDistrict = 'stateDistrict';
$state = 'state';
$countryRegion = 'countryRegion';
$country = 'country';
$worldRegion = 'worldRegion';
$postCode = 'postCode';
$poBox = 'poBox';
$this->beConstructedWith(
$house,
$houseNumber,
$road,
$unit,
$level,
$staircase,
$entrance,
$suburb,
$cityDistrict,
$city,
$island,
$stateDistrict,
$state,
$countryRegion,
$country,
$worldRegion,
$postCode,
$poBox
);
$this->house->shouldBeLike($house);
$this->houseNumber->shouldBeLike($houseNumber);
$this->road->shouldBeLike($road);
$this->unit->shouldBeLike($unit);
$this->level->shouldBeLike($level);
$this->staircase->shouldBeLike($staircase);
$this->entrance->shouldBeLike($entrance);
$this->suburb->shouldBeLike($suburb);
$this->cityDistrict->shouldBeLike($cityDistrict);
$this->city->shouldBeLike($city);
$this->island->shouldBeLike($island);
$this->stateDistrict->shouldBeLike($stateDistrict);
$this->state->shouldBeLike($state);
$this->countryRegion->shouldBeLike($countryRegion);
$this->country->shouldBeLike($country);
$this->worldRegion->shouldBeLike($worldRegion);
$this->postCode->shouldBeLike($postCode);
$this->poBox->shouldBeLike($poBox);
}
}