コード例 #1
0
ファイル: AbstractGuy.php プロジェクト: NaszvadiG/ImageCMS
 public function wantTo($text)
 {
     if ($this->scenario->running()) {
         $this->scenario->runStep();
         return $this;
     }
     $this->scenario->setFeature(strtolower($text));
     return $this;
 }
コード例 #2
0
ファイル: AbstractGuy.php プロジェクト: BatVane/Codeception
 public function testMethod($signature)
 {
     if (!$this->scenario->getFeature()) {
         $this->scenario->setFeature("test method {$signature}()");
     } else {
         $this->scenario->setFeature($this->scenario->getFeature() . " with [[{$signature}]]");
     }
     $this->scenario->condition(array_merge(array('testMethod', $signature)));
     return $this;
 }
コード例 #3
0
ファイル: AbstractGuy.php プロジェクト: pfz/codeception
 public function testMethod($signature)
 {
     $this->scenario->condition('testMethod', array($signature));
     if ($this->scenario->running()) {
         $this->scenario->runStep();
         return $this;
     }
     if (!$this->scenario->getFeature()) {
         $this->scenario->setFeature("test method {$signature}()");
     } else {
         $this->scenario->setFeature($this->scenario->getFeature() . " with [[{$signature}]]");
     }
     return $this;
 }
コード例 #4
0
ファイル: Parser.php プロジェクト: solutionDrive/Codeception
 public function parseFeature($code)
 {
     $matches = [];
     $code = $this->stripComments($code);
     $res = preg_match("~\\\$I->wantTo\\(\\s*?['\"](.*?)['\"]\\s*?\\);~", $code, $matches);
     if ($res) {
         $this->scenario->setFeature($matches[1]);
         return;
     }
     $res = preg_match("~\\\$I->wantToTest\\(['\"](.*?)['\"]\\);~", $code, $matches);
     if ($res) {
         $this->scenario->setFeature("test " . $matches[1]);
         return;
     }
 }
コード例 #5
0
ファイル: Actor.php プロジェクト: hitechdk/Codeception
 public function wantTo($text)
 {
     $this->scenario->setFeature(mb_strtolower($text));
 }