File tree Expand file tree Collapse file tree 4 files changed +20
-1
lines changed
tests/unit/product/behavior Expand file tree Collapse file tree 4 files changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -17,4 +17,6 @@ public function getTariffType(): TariffTypeInterface
1717 {
1818 return $ this ->tariffType ;
1919 }
20+
21+ abstract public function description (): string ;
2022}
Original file line number Diff line number Diff line change @@ -12,4 +12,13 @@ interface BehaviorInterface
1212 public function setTariffType (TariffTypeInterface $ tariffTypeName ): void ;
1313
1414 public function getTariffType (): TariffTypeInterface ;
15+
16+ /**
17+ * Returns a description of the behavior formatted with HTML.
18+ * The description can be either static, or use the object values.
19+ *
20+ * It can be later used for UI or documentation purposes.
21+ * @return string
22+ */
23+ public function description (): string ;
1524}
Original file line number Diff line number Diff line change 44
55class FakeBehavior extends TestBehavior
66{
7-
7+ public function description (): string
8+ {
9+ return 'Fake behavior for testing scenarios ' ;
10+ }
811}
Original file line number Diff line number Diff line change @@ -17,4 +17,9 @@ public function getContext()
1717 {
1818 return $ this ->context ;
1919 }
20+
21+ public function description (): string
22+ {
23+ return 'Test behavior for testing purposes ' ;
24+ }
2025}
You can’t perform that action at this time.
0 commit comments