Skip to content

Commit

Permalink
don't actually need factory here
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul M. Jones committed Apr 5, 2018
1 parent cf458cd commit 5788cbb
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 15 deletions.
7 changes: 0 additions & 7 deletions src/ConnectionLocator.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,6 @@ public static function new(...$args)
return new static(Connection::factory(...$args));
}

public static function factory(...$args)
{
return function () use ($args) {
return static::new(...$args);
};
}

public function __construct(
callable $default = null,
array $read = [],
Expand Down
8 changes: 0 additions & 8 deletions tests/ConnectionLocatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,6 @@ public function testNewWithPdo()
$this->assertSame($pdo, $actual->getDefault()->getPdo());
}

public function testFactory()
{
$factory = ConnectionLocator::factory('sqlite::memory:');
$actual = $factory();
$this->assertInstanceOf(ConnectionLocator::CLASS, $actual);
$this->assertInstanceOf(PDO::CLASS, $actual->getDefault()->getPdo());
}

public function testGetDefault()
{
$locator = $this->newLocator();
Expand Down

0 comments on commit 5788cbb

Please sign in to comment.