1 | <?php |
||
11 | class PaymentsCest |
||
12 | { |
||
13 | public $billId; |
||
14 | |||
15 | public function ensureBillPageWorks(Manager $I): void |
||
20 | |||
21 | /** |
||
22 | * Tries to create a new simple bill without any data. |
||
23 | * |
||
24 | * Expects blank field errors. |
||
25 | * |
||
26 | * @param Manager $I |
||
27 | * @throws \Exception |
||
28 | */ |
||
29 | public function ensureICantCreateBillWithoutRequiredData(Manager $I): void |
||
38 | |||
39 | /** |
||
40 | * Tries to create a new simple bill with all necessary data. |
||
41 | * |
||
42 | * Expects successful bill creation. |
||
43 | * |
||
44 | * @param Manager $I |
||
45 | */ |
||
46 | public function ensureICanCreateSimpleBill(Manager $I): void |
||
53 | |||
54 | /** |
||
55 | * Tries to create a new detailed bill without charge data. |
||
56 | * |
||
57 | * Expects blank field errors. |
||
58 | * |
||
59 | * @param Manager $I |
||
60 | * @throws \Exception |
||
61 | */ |
||
62 | public function ensureICantCreateDetailedBillWithoutData(Manager $I): void |
||
73 | |||
74 | /** |
||
75 | * Tries to create a new detailed bill with all the necessary data. |
||
76 | * |
||
77 | * Expects successful bill creation. |
||
78 | * Also checks Sum field mismatch error. |
||
79 | * |
||
80 | * @param Manager $I |
||
81 | * @throws \Exception |
||
82 | */ |
||
83 | public function ensureICanCreateDetailedBill(Manager $I): void |
||
105 | |||
106 | /** |
||
107 | * Tries to update early created bill. |
||
108 | * |
||
109 | * @param Manager $I |
||
110 | */ |
||
111 | public function ensureICanUpdateBill(Manager $I): void |
||
127 | |||
128 | /** |
||
129 | * Checks whether a bill was updated successfully. |
||
130 | * |
||
131 | * @param Manager $I |
||
132 | * @throws \Exception |
||
133 | */ |
||
134 | public function ensureBillWasSuccessfullyUpdated (Manager $I): void |
||
145 | |||
146 | /** |
||
147 | * @return array |
||
148 | */ |
||
149 | protected function getBillData(): array |
||
159 | |||
160 | /** |
||
161 | * @param string $objectId |
||
162 | * @return array |
||
163 | */ |
||
164 | protected function getChargeData(string $objectId): array |
||
174 | } |
||
175 |