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

Commit 7a0971d

Browse files
committed
add basic test
1 parent 2103c9e commit 7a0971d

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

tests/SqlFunctionRepositoryTest.php

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,25 @@
22

33
namespace MichaelRubel\SqlFunctionRepository\Tests;
44

5+
use Illuminate\Database\QueryException;
6+
use MichaelRubel\SqlFunctionRepository\SqlFunctionRepository;
7+
use MichaelRubel\SqlFunctionRepository\Traits\ResolvesDatabaseDriver;
8+
59
class SqlFunctionRepositoryTest extends TestCase
610
{
11+
use ResolvesDatabaseDriver;
12+
713
/** @test */
8-
public function testCanRunSqlFunction()
14+
public function testPostgresqlRepositoryReturnsExceptionOnSqlite()
915
{
16+
if ($this->usingSQLite()) {
17+
$this->expectException(QueryException::class);
18+
19+
$repository = app(SqlFunctionRepository::class);
20+
21+
$repository->runDatabaseFunction('testFunctionName', ['value']);
22+
}
23+
1024
$this->assertTrue(true);
1125
}
1226
}

0 commit comments

Comments
 (0)