PowerUpCest.php 502 B

12345678910111213141516171819202122232425
  1. <?php
  2. class PowerUpCest
  3. {
  4. public function iHaveNoPower(PowerGuy $I)
  5. {
  6. $I->expectThrowable('Exception', function() use ($I) {
  7. $I->gotThePower();
  8. });
  9. }
  10. /**
  11. * @prepare drinkBluePotion
  12. * @param PowerGuy $I
  13. */
  14. public function iGotBluePotion(PowerGuy $I)
  15. {
  16. $I->gotThePower();
  17. }
  18. protected function drinkBluePotion(\Codeception\Module\PowerHelper $helper)
  19. {
  20. $helper->_reconfigure(['has_power' => true]);
  21. }
  22. }