| 1 | <?php |
||
| 19 | abstract class BaseCodeceptionCest implements CodeceptionCest |
||
| 20 | { |
||
| 21 | |||
| 22 | use WithMockery, BacksUpItems; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @var Scenario |
||
| 26 | */ |
||
| 27 | protected $scenario; |
||
| 28 | |||
| 29 | /** |
||
| 30 | * @var Step |
||
| 31 | */ |
||
| 32 | protected $step; |
||
| 33 | |||
| 34 | // region <<-[ Codeception hooks ]->> |
||
| 35 | |||
| 36 | /** |
||
| 37 | * @inheritDoc |
||
| 38 | */ |
||
| 39 | public function _initialize() |
||
| 43 | |||
| 44 | /** |
||
| 45 | * @inheritDoc |
||
| 46 | */ |
||
| 47 | public function _cleanup() |
||
| 51 | |||
| 52 | /** |
||
| 53 | * @inheritDoc |
||
| 54 | */ |
||
| 55 | public function _beforeSuite(array $settings = []) |
||
| 59 | |||
| 60 | /** |
||
| 61 | * @inheritDoc |
||
| 62 | */ |
||
| 63 | public function _afterSuite() |
||
| 67 | |||
| 68 | /** |
||
| 69 | * @inheritDoc |
||
| 70 | */ |
||
| 71 | public function _beforeStep(Step $step) |
||
| 75 | |||
| 76 | /** |
||
| 77 | * @inheritDoc |
||
| 78 | */ |
||
| 79 | public function _afterStep(Step $step) |
||
| 83 | |||
| 84 | // endregion [ Codeception hooks ] |
||
| 85 | |||
| 86 | /** |
||
| 87 | * @return Scenario |
||
| 88 | */ |
||
| 89 | protected function getScenario() : Scenario |
||
| 93 | |||
| 94 | /** |
||
| 95 | * @return Step |
||
| 96 | */ |
||
| 97 | protected function getStep() : Step |
||
| 101 | |||
| 102 | /** |
||
| 103 | * @return object |
||
| 104 | */ |
||
| 105 | final protected function getTesterAttribute() |
||
| 111 | |||
| 112 | // FIXME: Is there not a better way to dynamically create the correct actor class from here? |
||
| 113 | |||
| 114 | /** |
||
| 115 | * @return string |
||
| 116 | */ |
||
| 117 | abstract protected function getActorClass() : string; |
||
| 118 | |||
| 119 | } |
||
| 120 |