This repository was archived by the owner on Mar 15, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change 33namespace MichaelRubel \SqlFunctionRepository \Tests ;
44
55use Illuminate \Database \QueryException ;
6+ use MichaelRubel \SqlFunctionRepository \Repositories \PostgresqlFunctionRepository ;
67use MichaelRubel \SqlFunctionRepository \SqlFunctionRepository ;
78use 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 }
You can’t perform that action at this time.
0 commit comments