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 { 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]);