Graze\Supervisor\ProcessSupervisorTest::testRestart PHP Метод

testRestart() публичный Метод

public testRestart ( )
    public function testRestart()
    {
        $fn = function () {
        };
        $process = clone $this->process;
        $this->process->shouldReceive('restart')->once()->with($fn)->andReturn($process);
        $this->assertSame($this->sup, $this->sup->restart($fn));
        $this->assertNull($this->sup->stderr);
        $this->assertNull($this->sup->stdout);
        // Check wrapped process is the new one
        $process->shouldReceive('isTerminated')->once()->withNoArgs()->andReturn(false);
        $this->sup->ping();
    }