public function __call($method, $arguments) { if ($this->scenario->running()) { $class = get_class($this); throw new \RuntimeException("Call to undefined method {$class}::{$method}"); } $this->scenario->addStep(new Action($method, $arguments)); }
/** * Lazy-execution given anonymous function * @param $callable \Closure * @return $this */ public function execute($callable) { $this->scenario->addStep(new Executor($callable, [])); $callable(); return $this; }
/** * Lazy-execution given anonymous function * @param $callable \Closure * @return $this */ public function execute($callable) { $this->scenario->addStep(new \Codeception\Step\Executor($callable, array())); $callable(); return $this; }
protected function addCommentStep($comment) { $this->scenario->addStep(new \Codeception\Step\Comment($comment, [])); }