![]() 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/Lib/ |
<?php namespace Codeception\Lib; use Psy\Shell; use Psy\Configuration; class PauseShell { public const LOG_FILE = '.pause.log'; private Configuration $psyConf; public function __construct() { $relativeLogFilePath = codecept_relative_path(codecept_output_dir(self::LOG_FILE)); $this->psyConf = new Configuration([ 'prompt' => '>> ', 'startupMessage' => "<warning>Execution PAUSED</warning> All commands will be saved to $relativeLogFilePath" ]); $this->psyConf->setHistoryFile(codecept_output_dir(self::LOG_FILE)); $this->psyConf->setHistorySize(1000); } public function addMessage(string $message): self { $this->psyConf->setStartupMessage($this->psyConf->getStartupMessage() . "\n" . $message); return $this; } public function getShell(): Shell { return new Shell($this->psyConf); } }