Pantheon\Terminus\Models\Workflow::isFinished PHP Méthode

isFinished() public méthode

Detects if the workflow has finished
public isFinished ( ) : boolean
Résultat boolean True if workflow has finished
    public function isFinished()
    {
        $is_finished = (bool) $this->get('result');
        return $is_finished;
    }

Usage Example

 public function testStatus()
 {
     $this->assertEquals('running', $this->workflow->getStatus());
     $this->assertEquals(false, $this->workflow->isSuccessful());
     $this->assertEquals(false, $this->workflow->isFinished());
     $this->workflow->set('result', 'succeeded');
     $this->assertEquals('succeeded', $this->workflow->getStatus());
     $this->assertEquals(true, $this->workflow->isSuccessful());
     $this->assertEquals(true, $this->workflow->isFinished());
     $this->workflow->set('result', 'failed');
     $this->assertEquals('failed', $this->workflow->getStatus());
     $this->assertEquals(false, $this->workflow->isSuccessful());
     $this->assertEquals(true, $this->workflow->isFinished());
 }