Return tests to passing state
This commit is contained in:
parent
e96ead4c4d
commit
fde0660e6c
3 changed files with 17 additions and 45 deletions
|
@ -29,20 +29,15 @@ class SuspensionServiceTest extends IntegrationTestCase
|
|||
{
|
||||
$server = $this->createServerModel();
|
||||
|
||||
$this->repository->expects('setServer')->twice()->andReturnSelf();
|
||||
$this->repository->expects('suspend')->with(false)->andReturnUndefined();
|
||||
$this->repository->expects('setServer->sync')->twice()->andReturnSelf();
|
||||
|
||||
$this->getService()->toggle($server, SuspensionService::ACTION_SUSPEND);
|
||||
|
||||
$server->refresh();
|
||||
$this->assertTrue($server->isSuspended());
|
||||
|
||||
$this->repository->expects('suspend')->with(true)->andReturnUndefined();
|
||||
$this->assertTrue($server->refresh()->isSuspended());
|
||||
|
||||
$this->getService()->toggle($server, SuspensionService::ACTION_UNSUSPEND);
|
||||
|
||||
$server->refresh();
|
||||
$this->assertFalse($server->isSuspended());
|
||||
$this->assertFalse($server->refresh()->isSuspended());
|
||||
}
|
||||
|
||||
public function testNoActionIsTakenIfSuspensionStatusIsUnchanged()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue