diff --git a/src/Test/AssertionHelpers.php b/src/Test/AssertionHelpers.php index ee43c36..6e3fbbf 100644 --- a/src/Test/AssertionHelpers.php +++ b/src/Test/AssertionHelpers.php @@ -49,8 +49,7 @@ public function assertConnection(array $options, $message = null) ->then(function (ConnectionInterface $conn) use ($clientLoop) { $conn->close(); return true; - }, function (\Exception $e) { - throw $e; + }, function () { return false; }); $clientLoop->run(); diff --git a/tests/ToxiproxyTest.php b/tests/ToxiproxyTest.php index adb9617..c5209d9 100644 --- a/tests/ToxiproxyTest.php +++ b/tests/ToxiproxyTest.php @@ -129,4 +129,18 @@ public function testUpdate() $toxiproxy->delete($updatedProxy); } + + public function testUpdateDisabled() + { + $toxiproxy = $this->createToxiproxy(); + + $proxy = $this->createProxy($toxiproxy); + $this->assertProxyAvailable($proxy); + + $proxy->setEnabled(false); + $proxy = $toxiproxy->update($proxy); + $this->assertProxyUnavailable($proxy); + + $toxiproxy->delete($proxy); + } }