AsyncPHP\Doorman\Manager\ProcessManager::setShell PHP Method

setShell() public method

public setShell ( AsyncPHP\Doorman\Shell $shell )
$shell AsyncPHP\Doorman\Shell
    public function setShell(Shell $shell)
    {
        $this->shell = $shell;
        return $this;
    }

Usage Example

Example #1
0
 /**
  * @test
  */
 public function gettersAndSettersWork()
 {
     $this->manager->setLogPath(__DIR__);
     $this->assertEquals(__DIR__, $this->manager->getLogPath());
     $this->assertInstanceOf("AsyncPHP\\Doorman\\Shell", $this->manager->getShell());
     $shell = new BashShell();
     $this->manager->setShell($shell);
     $this->assertEquals($shell, $this->manager->getShell());
     $this->assertInstanceOf("AsyncPHP\\Doorman\\Rules", $this->manager->getRules());
     $rules = new InMemoryRules();
     $this->manager->setRules($rules);
     $this->assertEquals($rules, $this->manager->getRules());
 }