%PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY
Server IP : 49.231.201.246 / Your IP : 216.73.216.149 Web Server : Apache/2.4.18 (Ubuntu) System : Linux 246 4.4.0-210-generic #242-Ubuntu SMP Fri Apr 16 09:57:56 UTC 2021 x86_64 User : root ( 0) PHP Version : 7.0.33-0ubuntu0.16.04.16 Disable Function : exec,passthru,shell_exec,system,proc_open,popen,pcntl_exec MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /proc/11585/cwd/html/water/vendor/codeception/codeception/src/Codeception/Test/ |
Upload File : |
<?php namespace Codeception\Test; use Codeception\Exception\TestParseException; use Codeception\Lib\Parser; use Codeception\Lib\Console\Message; /** * Executes tests delivered in Cept format. * Prepares metadata, parses test body on preload, and executes a test in `test` method. */ class Cept extends Test implements Interfaces\Plain, Interfaces\ScenarioDriven, Interfaces\Reported, Interfaces\Dependent { use Feature\ScenarioLoader; /** * @var Parser */ protected $parser; public function __construct($name, $file) { $metadata = new Metadata(); $metadata->setName($name); $metadata->setFilename($file); $this->setMetadata($metadata); $this->createScenario(); $this->parser = new Parser($this->getScenario(), $this->getMetadata()); } public function preload() { $this->getParser()->prepareToRun($this->getSourceCode()); } public function test() { $scenario = $this->getScenario(); $testFile = $this->getMetadata()->getFilename(); /** @noinspection PhpIncludeInspection */ try { require $testFile; } catch (\ParseError $e) { throw new TestParseException($testFile, $e->getMessage(), $e->getLine()); } } public function getSignature() { return $this->getMetadata()->getName() . 'Cept'; } public function toString() { return $this->getSignature() . ': ' . Message::ucfirst($this->getFeature()); } public function getSourceCode() { return file_get_contents($this->getFileName()); } public function getReportFields() { return [ 'name' => basename($this->getFileName(), 'Cept.php'), 'file' => $this->getFileName(), 'feature' => $this->getFeature() ]; } /** * @return Parser */ protected function getParser() { return $this->parser; } public function fetchDependencies() { return $this->getMetadata()->getDependencies(); } }