|
@@ 50-59 (lines=10) @@
|
| 47 |
|
$this->assertEquals(ImportRun::STATE_CREATED, $this->importRun->getState()); |
| 48 |
|
} |
| 49 |
|
|
| 50 |
|
public function testRevoke() |
| 51 |
|
{ |
| 52 |
|
$this->importRun->finish(); |
| 53 |
|
|
| 54 |
|
$this->assertFalse($this->importRun->isRevoked()); |
| 55 |
|
|
| 56 |
|
$this->assertEquals($this->importRun, $this->importRun->revoke('revokedBy')); |
| 57 |
|
|
| 58 |
|
$this->assertTrue($this->importRun->isRevoked()); |
| 59 |
|
$this->assertFalse($this->importRun->isRunnable()); |
| 60 |
|
$this->assertEquals(ImportRun::STATE_REVOKED, $this->importRun->getState()); |
| 61 |
|
} |
| 62 |
|
|
|
@@ 63-72 (lines=10) @@
|
| 60 |
|
$this->assertEquals(ImportRun::STATE_REVOKED, $this->importRun->getState()); |
| 61 |
|
} |
| 62 |
|
|
| 63 |
|
public function testReset() |
| 64 |
|
{ |
| 65 |
|
$this->importRun->finish(); |
| 66 |
|
|
| 67 |
|
$this->assertEquals($this->importRun, $this->importRun->reset()); |
| 68 |
|
|
| 69 |
|
$this->assertFalse($this->importRun->isRevoked()); |
| 70 |
|
$this->assertTrue($this->importRun->isRunnable()); |
| 71 |
|
$this->assertEquals(ImportRun::STATE_CREATED, $this->importRun->getState()); |
| 72 |
|
} |
| 73 |
|
|
| 74 |
|
public function testFinish() |
| 75 |
|
{ |
|
@@ 74-81 (lines=8) @@
|
| 71 |
|
$this->assertEquals(ImportRun::STATE_CREATED, $this->importRun->getState()); |
| 72 |
|
} |
| 73 |
|
|
| 74 |
|
public function testFinish() |
| 75 |
|
{ |
| 76 |
|
$this->assertFalse($this->importRun->isFinished()); |
| 77 |
|
|
| 78 |
|
$this->assertEquals($this->importRun, $this->importRun->finish()); |
| 79 |
|
|
| 80 |
|
$this->assertTrue($this->importRun->isFinished()); |
| 81 |
|
$this->assertFalse($this->importRun->isRunnable()); |
| 82 |
|
$this->assertEquals(ImportRun::STATE_FINISHED, $this->importRun->getState()); |
| 83 |
|
} |
| 84 |
|
|