forked from Alex/Pterodactyl-Panel
Update NodeUpdateServiceTest.php
This commit is contained in:
parent
79673ca440
commit
5d23d894ae
@ -210,11 +210,8 @@ class NodeUpdateServiceTest extends TestCase
|
|||||||
try {
|
try {
|
||||||
$closure();
|
$closure();
|
||||||
} catch (Exception $exception) {
|
} catch (Exception $exception) {
|
||||||
$this->assertInstanceOf(DaemonConnectionException::class, $exception);
|
$this->assertInstanceOf(Exception::class, $exception);
|
||||||
$this->assertSame(
|
$this->assertSame('Foo', $exception->getMessage());
|
||||||
'There was an exception while attempting to communicate with the daemon resulting in a HTTP/E_CONN_REFUSED response code. This exception has been logged.',
|
|
||||||
$exception->getMessage()
|
|
||||||
);
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -224,9 +221,7 @@ class NodeUpdateServiceTest extends TestCase
|
|||||||
|
|
||||||
$this->repository->expects('withFreshModel->update')->andReturns($updatedModel);
|
$this->repository->expects('withFreshModel->update')->andReturns($updatedModel);
|
||||||
$this->configurationRepository->expects('setNode->update')->andThrow(
|
$this->configurationRepository->expects('setNode->update')->andThrow(
|
||||||
new DaemonConnectionException(
|
new Exception('Foo')
|
||||||
new TransferException('', 500, new Exception)
|
|
||||||
)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->getService()->handle($model, ['name' => $updatedModel->name]);
|
$this->getService()->handle($model, ['name' => $updatedModel->name]);
|
||||||
|
Loading…
Reference in New Issue
Block a user