Skip to content

Commit 17e59dd

Browse files
HP-2512 made BillingRegistryServiceTest is more readable
1 parent cb9c391 commit 17e59dd

File tree

1 file changed

+27
-24
lines changed

1 file changed

+27
-24
lines changed

tests/unit/product/Application/BillingRegistryServiceTest.php

Lines changed: 27 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,12 @@ public function testGetBehavior(): void
7575
$type = Type::anyId('dummy');
7676
$tariffTypeDefinition
7777
->withPrices()
78-
->priceType($type)
79-
->withBehaviors()
80-
->attach($dummyBehavior);
78+
->priceType($type)
79+
->withBehaviors()
80+
->attach($dummyBehavior)
81+
->end()
82+
->end()
83+
->end();
8184

8285
$this->registry->addTariffType($tariffTypeDefinition);
8386

@@ -98,17 +101,17 @@ public function testGetBehavior_WithMultipleTariffTypeDefinitions(): void
98101

99102
$tariffTypeDefinition
100103
->withPrices()
101-
->priceType($type1)
102-
->withBehaviors()
103-
->attach($dummyBehavior1)
104-
->end()
105-
->end()
106-
->priceType($type2)
107-
->withBehaviors()
108-
->attach($dummyBehavior2)
109-
->attach($dummyBehavior3)
110-
->end()
111-
->end()
104+
->priceType($type1)
105+
->withBehaviors()
106+
->attach($dummyBehavior1)
107+
->end()
108+
->end()
109+
->priceType($type2)
110+
->withBehaviors()
111+
->attach($dummyBehavior2)
112+
->attach($dummyBehavior3)
113+
->end()
114+
->end()
112115
->end();
113116

114117
$this->registry->addTariffType($tariffTypeDefinition);
@@ -130,23 +133,23 @@ public function testGetBehavior_WithMultiplePriceTypeDefinitions(): void
130133
$type1 = Type::anyId('type,dummy1');
131134
$tariffTypeDefinition1
132135
->withPrices()
133-
->priceType($type1)
134-
->withBehaviors()
135-
->attach($testBehavior)
136-
->end()
137-
->end()
136+
->priceType($type1)
137+
->withBehaviors()
138+
->attach($testBehavior)
139+
->end()
140+
->end()
138141
->end();
139142

140143
$tariffTypeDefinition2 = new TariffTypeDefinition(new FakeTariffType());
141144
$fakeBehavior = new FakeBehavior('dummy');
142145
$type2 = Type::anyId('type,dummy2');
143146
$tariffTypeDefinition2
144147
->withPrices()
145-
->priceType($type2)
146-
->withBehaviors()
147-
->attach($fakeBehavior)
148-
->end()
149-
->end()
148+
->priceType($type2)
149+
->withBehaviors()
150+
->attach($fakeBehavior)
151+
->end()
152+
->end()
150153
->end();
151154

152155
$this->registry->addTariffType($tariffTypeDefinition1);

0 commit comments

Comments
 (0)