public function __call($method, $args) { // if (!in_array($method, array_keys(TestGuy::$methods))) throw new \RuntimeException("Action $method not defined"); if (0 === strpos($method, 'see')) { $this->scenario->assertion(array_merge(array($method), $args)); } elseif (0 === strpos($method, 'am')) { $this->scenario->condition(array_merge(array($method), $args)); } else { $this->scenario->action(array_merge(array($method), $args)); } return $this; }