diff --git a/src/Kitar/Dynamodb/Connection.php b/src/Kitar/Dynamodb/Connection.php index 94783c8..6be55ef 100644 --- a/src/Kitar/Dynamodb/Connection.php +++ b/src/Kitar/Dynamodb/Connection.php @@ -91,7 +91,8 @@ protected function createClient(array $config) if (isset($config['key']) && isset($config['secret'])) { $dynamoConfig['credentials'] = Arr::only( - $config, ['key', 'secret', 'token'] + $config, + ['key', 'secret', 'token'] ); } @@ -103,9 +104,7 @@ protected function createClient(array $config) */ public function disconnect() { - unset($this->client); - - $this->client = null; + // } /** diff --git a/tests/ConnectionTest.php b/tests/ConnectionTest.php index 801f839..e093ab7 100644 --- a/tests/ConnectionTest.php +++ b/tests/ConnectionTest.php @@ -50,11 +50,11 @@ public function it_returns_driver_name() } /** @test */ - public function it_destroys_connection() + public function it_keeps_dynamodb_client_on_disconnect() { $this->connection->disconnect(); - $this->assertNull($this->connection->getClient()); + $this->assertNotNull($this->connection->getClient()); } /** @test */