Skip to content
This repository was archived by the owner on Mar 15, 2024. It is now read-only.

Commit c75279b

Browse files
committed
additional test
1 parent 4fe74e8 commit c75279b

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

tests/SqlFunctionRepositoryTest.php

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace MichaelRubel\SqlFunctionRepository\Tests;
44

55
use Illuminate\Database\QueryException;
6+
use MichaelRubel\SqlFunctionRepository\Repositories\PostgresqlFunctionRepository;
67
use MichaelRubel\SqlFunctionRepository\SqlFunctionRepository;
78
use MichaelRubel\SqlFunctionRepository\Traits\ResolvesDatabaseDriver;
89

@@ -11,12 +12,20 @@ class SqlFunctionRepositoryTest extends TestCase
1112
use ResolvesDatabaseDriver;
1213

1314
/** @test */
14-
public function testPostgresqlRepositoryReturnsExceptionOnSqlite()
15+
public function testCanInvokePostgresRepositoryUsingInterface()
16+
{
17+
$repository = app(SqlFunctionRepository::class);
18+
19+
$this->assertInstanceOf(PostgresqlFunctionRepository::class, $repository);
20+
}
21+
22+
/** @test */
23+
public function testPostgresqlRepositoryReturnsExceptionWhenSqlite()
1524
{
1625
if ($this->usingSQLite()) {
1726
$this->expectException(QueryException::class);
1827

19-
$repository = app(SqlFunctionRepository::class);
28+
$repository = app(PostgresqlFunctionRepository::class);
2029

2130
$repository->runDatabaseFunction('testFunctionName', ['value']);
2231
}

0 commit comments

Comments
 (0)