Exemplo n.º 1
0
 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));
 }
Exemplo n.º 2
0
 /**
  * Lazy-execution given anonymous function
  * @param $callable \Closure
  * @return $this
  */
 public function execute($callable)
 {
     $this->scenario->addStep(new Executor($callable, []));
     $callable();
     return $this;
 }
Exemplo n.º 3
0
 /**
  * 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;
 }
Exemplo n.º 4
0
 protected function addCommentStep($comment)
 {
     $this->scenario->addStep(new \Codeception\Step\Comment($comment, []));
 }