示例#1
0
 public function preload()
 {
     $this->scenario->setFeature($this->getSpecFromMethod());
     $code = $this->getSourceCode();
     $this->parser->parseFeature($code);
     $this->parser->attachMetadata(Annotation::forMethod($this->testClassInstance, $this->testMethod)->raw());
     $this->getMetadata()->getService('di')->injectDependencies($this->testClassInstance);
 }
示例#2
0
 public function preload()
 {
     $this->scenario->setFeature($this->getSpecFromMethod());
     $code = $this->getSourceCode();
     $this->parser->parseFeature($code);
     $this->parser->attachMetadata(Annotation::forMethod($this->testClassInstance, $this->testMethod)->raw());
     $this->getMetadata()->getService('di')->injectDependencies($this->testClassInstance);
     // add example params to feature
     if ($this->getMetadata()->getCurrent('example')) {
         $params = implode(', ', array_values($this->getMetadata()->getCurrent('example')));
         $this->getScenario()->setFeature($this->getScenario()->getFeature() . ' | ' . $params);
     }
 }
示例#3
0
 public function preload()
 {
     $this->scenario->setFeature($this->getSpecFromMethod());
     $code = $this->getSourceCode();
     $this->parser->parseFeature($code);
     $this->parser->attachMetadata(Annotation::forMethod($this->testClassInstance, $this->testMethod)->raw());
     $this->getMetadata()->getService('di')->injectDependencies($this->testClassInstance);
     // add example params to feature
     if ($this->getMetadata()->getCurrent('example')) {
         $step = new Comment('', $this->getMetadata()->getCurrent('example'));
         $this->getScenario()->setFeature($this->getScenario()->getFeature() . ' | ' . $step->getArgumentsAsString(100));
     }
 }