Spamworldpro Mini Shell
Spamworldpro


Server : Apache
System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64
User : corals ( 1002)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/corals/old/vendor/codeception/codeception/src/Codeception/Test/Feature/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //home/corals/old/vendor/codeception/codeception/src/Codeception/Test/Feature/ScenarioLoader.php
<?php

declare(strict_types=1);

namespace Codeception\Test\Feature;

use Codeception\Lib\Parser;
use Codeception\Scenario;
use Codeception\Test\Metadata;

trait ScenarioLoader
{
    private Scenario $scenario;

    abstract public function getMetadata(): Metadata;

    protected function createScenario(): void
    {
        $this->scenario = new Scenario($this);
    }

    public function getScenario(): Scenario
    {
        return $this->scenario;
    }

    public function getFeature(): string
    {
        return $this->getScenario()->getFeature();
    }

    public function getScenarioText(string $format = 'text'): string
    {
        $code = $this->getSourceCode();
        $this->getParser()->parseFeature($code);
        $this->getParser()->parseSteps($code);
        if ($format == 'html') {
            return $this->getScenario()->getHtml();
        }
        return $this->getScenario()->getText();
    }

    abstract protected function getParser(): Parser;

    abstract public function getSourceCode(): string;
}

Spamworldpro Mini