Skip to content

Commit cd27386

Browse files
HP-1751 fixed BillingRegistryTest::testAddTariffTypeAndRetrievePriceTypes() test case
1 parent ceecba5 commit cd27386

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

tests/unit/product/BillingRegistryTest.php

+5-3
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,11 @@
44

55
use hiqdev\php\billing\product\BillingRegistry;
66
use hiqdev\php\billing\product\Exception\BillingRegistryLockedException;
7+
use hiqdev\php\billing\product\price\PriceTypeDefinition;
78
use hiqdev\php\billing\product\TariffTypeDefinition;
89
use hiqdev\php\billing\product\TariffTypeDefinitionInterface;
910
use hiqdev\php\billing\product\Exception\AggregateNotFoundException;
1011
use hiqdev\php\billing\product\invoice\InvalidRepresentationException;
11-
use hiqdev\php\billing\product\quantity\QuantityFormatterNotFoundException;
12-
use hiqdev\php\billing\product\behavior\BehaviorInterface;
1312
use hiqdev\php\billing\product\behavior\BehaviorNotFoundException;
1413
use hiqdev\php\billing\type\Type;
1514
use PHPUnit\Framework\TestCase;
@@ -38,7 +37,10 @@ public function testAddTariffTypeAndRetrievePriceTypes(): void
3837
$priceTypes = iterator_to_array($this->registry->priceTypes());
3938

4039
$this->assertCount(1, $priceTypes);
41-
$this->assertSame($this->tariffTypeDefinition, $priceTypes[0]);
40+
/** @var PriceTypeDefinition $priceTypeDefinition */
41+
$priceTypeDefinition = $priceTypes[0];
42+
43+
$this->assertSame($type, $priceTypeDefinition->type());
4244
}
4345

4446
public function testLockPreventsModification(): void

0 commit comments

Comments
 (0)