Skip to content

Commit

Permalink
Merge pull request #176 from leroy-merlin-br/fix/setup-connection-man…
Browse files Browse the repository at this point in the history
…ager

fix: setup connection on connection manager
  • Loading branch information
gabrielgomes94 authored Sep 14, 2022
2 parents 5b19969 + 01d79be commit 6d00304
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/Connection/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ class Manager
* pure PHP. After adding a connection into the Manager you are ready to
* persist and query your models.
*
* @param IlluminateContainer $connection connection instance to be used in database interactions
* @param Connection $connection connection instance to be used in database interactions
*/
public function setConnection(IlluminateContainer $connection): bool
public function setConnection(Connection $connection): bool
{
$this->init();
$this->container->instance(IlluminateContainer::class, $this->connection);
$this->container->instance(Connection::class, $this->connection);

$this->connection = $connection;

Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/Connection/ManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public function testShouldAddAndGetConnection(): void
{
// Set
$manager = new Manager();
$connection = m::mock(IlluminateContainer::class);
$connection = m::mock(Connection::class);
$client = m::mock(Client::class);

// Expectations
Expand Down

0 comments on commit 6d00304

Please sign in to comment.