Skip to content

Commit 6d00304

Browse files
Merge pull request #176 from leroy-merlin-br/fix/setup-connection-manager
fix: setup connection on connection manager
2 parents 5b19969 + 01d79be commit 6d00304

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/Connection/Manager.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,12 @@ class Manager
4646
* pure PHP. After adding a connection into the Manager you are ready to
4747
* persist and query your models.
4848
*
49-
* @param IlluminateContainer $connection connection instance to be used in database interactions
49+
* @param Connection $connection connection instance to be used in database interactions
5050
*/
51-
public function setConnection(IlluminateContainer $connection): bool
51+
public function setConnection(Connection $connection): bool
5252
{
5353
$this->init();
54-
$this->container->instance(IlluminateContainer::class, $this->connection);
54+
$this->container->instance(Connection::class, $this->connection);
5555

5656
$this->connection = $connection;
5757

tests/Unit/Connection/ManagerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public function testShouldAddAndGetConnection(): void
1414
{
1515
// Set
1616
$manager = new Manager();
17-
$connection = m::mock(IlluminateContainer::class);
17+
$connection = m::mock(Connection::class);
1818
$client = m::mock(Client::class);
1919

2020
// Expectations

0 commit comments

Comments
 (0)