mirror of
https://github.com/pestphp/pest.git
synced 2026-03-09 01:07:23 +01:00
refactors to use a Plugin to parse --ci option
This commit is contained in:
@ -73,13 +73,6 @@ final class TestSuite
|
||||
*/
|
||||
public $testPath;
|
||||
|
||||
/**
|
||||
* Holds the current working environment identifier.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $workingEnv;
|
||||
|
||||
/**
|
||||
* Holds an instance of the test suite.
|
||||
*
|
||||
@ -100,17 +93,15 @@ final class TestSuite
|
||||
|
||||
$this->rootPath = (string) realpath($rootPath);
|
||||
$this->testPath = $testPath;
|
||||
$this->workingEnv = 'local';
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the current instance of the test suite.
|
||||
*/
|
||||
public static function getInstance(string $rootPath = null, string $testPath = null, string $workingEnv = null): TestSuite
|
||||
public static function getInstance(string $rootPath = null, string $testPath = null): TestSuite
|
||||
{
|
||||
if (is_string($rootPath) && is_string($testPath)) {
|
||||
self::$instance = new TestSuite($rootPath, $testPath);
|
||||
self::$instance->workingEnv = $workingEnv ?? 'local';
|
||||
self::$instance = new TestSuite($rootPath, $testPath);
|
||||
|
||||
foreach (Plugin::$callables as $callable) {
|
||||
$callable();
|
||||
|
||||
Reference in New Issue
Block a user