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 3
3
namespace MichaelRubel \SqlFunctionRepository \Tests ;
4
4
5
5
use Illuminate \Database \QueryException ;
6
+ use MichaelRubel \SqlFunctionRepository \Repositories \PostgresqlFunctionRepository ;
6
7
use MichaelRubel \SqlFunctionRepository \SqlFunctionRepository ;
7
8
use MichaelRubel \SqlFunctionRepository \Traits \ResolvesDatabaseDriver ;
8
9
@@ -11,12 +12,20 @@ class SqlFunctionRepositoryTest extends TestCase
11
12
use ResolvesDatabaseDriver;
12
13
13
14
/** @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 ()
15
24
{
16
25
if ($ this ->usingSQLite ()) {
17
26
$ this ->expectException (QueryException::class);
18
27
19
- $ repository = app (SqlFunctionRepository ::class);
28
+ $ repository = app (PostgresqlFunctionRepository ::class);
20
29
21
30
$ repository ->runDatabaseFunction ('testFunctionName ' , ['value ' ]);
22
31
}
You can’t perform that action at this time.
0 commit comments