Update NodeUpdateServiceTest.php

This commit is contained in:
Dane Everitt 2020-12-06 12:25:36 -08:00
parent 79673ca440
commit 5d23d894ae
No known key found for this signature in database
GPG Key ID: EEA66103B3D71F53

View File

@ -210,11 +210,8 @@ class NodeUpdateServiceTest extends TestCase
try {
$closure();
} catch (Exception $exception) {
$this->assertInstanceOf(DaemonConnectionException::class, $exception);
$this->assertSame(
'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()
);
$this->assertInstanceOf(Exception::class, $exception);
$this->assertSame('Foo', $exception->getMessage());
return true;
}
@ -224,9 +221,7 @@ class NodeUpdateServiceTest extends TestCase
$this->repository->expects('withFreshModel->update')->andReturns($updatedModel);
$this->configurationRepository->expects('setNode->update')->andThrow(
new DaemonConnectionException(
new TransferException('', 500, new Exception)
)
new Exception('Foo')
);
$this->getService()->handle($model, ['name' => $updatedModel->name]);