Skip to content

Commit

Permalink
Test SQLite
Browse files Browse the repository at this point in the history
  • Loading branch information
staudenmeir committed Dec 18, 2018
1 parent 7c32938 commit 956698e
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ services:
env:
global:
- COVERAGE=no
- DB=mysql
- RELEASE=stable

matrix:
Expand All @@ -25,6 +26,8 @@ matrix:
- php: 7.3
- php: 7.3
env: RELEASE=lowest
- php: 7.3
env: DB=sqlite
allow_failures:
- php: 7.3
env: RELEASE=lowest
Expand Down
3 changes: 2 additions & 1 deletion tests/BelongsToJsonTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ protected function setUp()
{
parent::setUp();

if (! method_exists(DB::connection()->query(), 'whereJsonContains')) {
if (! method_exists(DB::connection()->query(), 'whereJsonContains')
|| DB::connection()->getDriverName() === 'sqlite') {
$this->markTestSkipped();
}
}
Expand Down
3 changes: 2 additions & 1 deletion tests/HasManyJsonTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ protected function setUp()
{
parent::setUp();

if (! method_exists(DB::connection()->query(), 'whereJsonContains')) {
if (! method_exists(DB::connection()->query(), 'whereJsonContains')
|| DB::connection()->getDriverName() === 'sqlite') {
$this->markTestSkipped();
}
}
Expand Down
4 changes: 4 additions & 0 deletions tests/config/database.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,8 @@
'schema' => 'public',
'sslmode' => 'prefer',
],
'sqlite' => [
'driver' => 'sqlite',
'database' => ':memory:'
],
];
4 changes: 4 additions & 0 deletions tests/config/database.travis.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,8 @@
'strict' => true,
'engine' => null,
],
'sqlite' => [
'driver' => 'sqlite',
'database' => ':memory:'
],
];

0 comments on commit 956698e

Please sign in to comment.