| @@ 24-37 (lines=14) @@ | ||
| 21 | */ |
|
| 22 | private $fields; |
|
| 23 | ||
| 24 | public function ensureThatICanCreateTariffPlan(Manager $I) |
|
| 25 | { |
|
| 26 | $this->fields = [ |
|
| 27 | 'name' => uniqid(), |
|
| 28 | 'type' => 'Template', |
|
| 29 | 'client' => 'hipanel_test_manager', |
|
| 30 | 'currency' => 'USD', |
|
| 31 | 'note' => 'test note', |
|
| 32 | ]; |
|
| 33 | $plan = new Create($I, $this->fields); |
|
| 34 | $plan->seeFields(); |
|
| 35 | $this->id = $plan->createPlan(); |
|
| 36 | $this->ensureThatICanSeeTariffPlan($I); |
|
| 37 | } |
|
| 38 | ||
| 39 | private function ensureThatICanSeeTariffPlan(Manager $I) |
|
| 40 | { |
|
| @@ 49-61 (lines=13) @@ | ||
| 46 | $search->ensurePlanCanBeFound($this->fields['name']); |
|
| 47 | } |
|
| 48 | ||
| 49 | public function ensureThatICanUpdateTariffPlan(Manager $I) |
|
| 50 | { |
|
| 51 | $this->fields = [ |
|
| 52 | 'name' => uniqid(), |
|
| 53 | 'type' => 'Server', |
|
| 54 | 'client' => 'hipanel_test_manager', |
|
| 55 | 'currency' => 'EUR', |
|
| 56 | 'note' => 'new_test_note', |
|
| 57 | ]; |
|
| 58 | $plan = new Update($I, $this->fields); |
|
| 59 | $this->id = $plan->updatePlan($this->id); |
|
| 60 | $this->ensureThatICanSeeTariffPlan($I); |
|
| 61 | } |
|
| 62 | ||
| 63 | public function ensureThatICanDeleteTariffPlan(Manager $I) |
|
| 64 | { |
|