@@ 44-59 (lines=16) @@ | ||
41 | ]); |
|
42 | } |
|
43 | ||
44 | public function testEnumPrice() |
|
45 | { |
|
46 | $price = $this->factory->create($this->createDto([ |
|
47 | 'id' => $this->id, |
|
48 | 'type' => $this->enum, |
|
49 | 'target' => $this->target, |
|
50 | 'unit' => $this->unit, |
|
51 | 'prices' => $this->prices, |
|
52 | ])); |
|
53 | $this->assertInstanceOf(EnumPrice::class, $price); |
|
54 | $this->assertSame($this->id, $price->getId()); |
|
55 | $this->assertSame($this->enum, $price->getType()); |
|
56 | $this->assertSame($this->target, $price->getTarget()); |
|
57 | $this->assertSame($this->unit, $price->getUnit()); |
|
58 | $this->assertSame($this->prices, $price->getPrices()); |
|
59 | } |
|
60 | ||
61 | public function testSinglePrice() |
|
62 | { |
|
@@ 61-76 (lines=16) @@ | ||
58 | $this->assertSame($this->prices, $price->getPrices()); |
|
59 | } |
|
60 | ||
61 | public function testSinglePrice() |
|
62 | { |
|
63 | $price = $this->factory->create($this->createDto([ |
|
64 | 'id' => $this->id, |
|
65 | 'type' => $this->single, |
|
66 | 'target' => $this->target, |
|
67 | 'prepaid' => $this->prepaid, |
|
68 | 'price' => $this->price, |
|
69 | ])); |
|
70 | $this->assertInstanceOf(SinglePrice::class, $price); |
|
71 | $this->assertSame($this->id, $price->getId()); |
|
72 | $this->assertSame($this->single, $price->getType()); |
|
73 | $this->assertSame($this->target, $price->getTarget()); |
|
74 | $this->assertSame($this->prepaid, $price->getPrepaid()); |
|
75 | $this->assertSame($this->price, $price->getPrice()); |
|
76 | } |
|
77 | ||
78 | public function createDto(array $data) |
|
79 | { |