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); }
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); } }
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)); } }