@@ 44-52 (lines=9) @@ | ||
41 | /** |
|
42 | * @test |
|
43 | */ |
|
44 | public function constructorMustBeAbleToReceiveTypeAndAddress() |
|
45 | { |
|
46 | $address = $this->getMock(Address::class, [], [], '', false); |
|
47 | $shipping = new Shipping(Type::TYPE_PAC, $address); |
|
48 | ||
49 | $this->assertAttributeEquals(Type::TYPE_PAC, 'type', $shipping); |
|
50 | $this->assertAttributeSame($address, 'address', $shipping); |
|
51 | $this->assertAttributeEquals(null, 'cost', $shipping); |
|
52 | } |
|
53 | ||
54 | /** |
|
55 | * @test |
|
@@ 57-65 (lines=9) @@ | ||
54 | /** |
|
55 | * @test |
|
56 | */ |
|
57 | public function constructorMustBeAbleToReceiveAllArguments() |
|
58 | { |
|
59 | $address = $this->getMock(Address::class, [], [], '', false); |
|
60 | $shipping = new Shipping(Type::TYPE_PAC, $address, '10.31'); |
|
61 | ||
62 | $this->assertAttributeEquals(Type::TYPE_PAC, 'type', $shipping); |
|
63 | $this->assertAttributeSame($address, 'address', $shipping); |
|
64 | $this->assertAttributeEquals(10.31, 'cost', $shipping); |
|
65 | } |
|
66 | ||
67 | /** |
|
68 | * @test |