Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions tests/Data/Entries/EntryQueryBuilderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ public function entries_are_found_using_or_where_not_between()
/** @test **/
public function entries_are_found_using_where_json_contains()
{
if (config('database.default') === 'sqlite') {
if ($this->isUsingSqlite()) {
$this->markTestSkipped('SQLite doesn\'t support JSON contains queries');
}

Expand All @@ -404,7 +404,7 @@ public function entries_are_found_using_where_json_contains()
/** @test **/
public function entries_are_found_using_where_json_doesnt_contain()
{
if (config('database.default') === 'sqlite') {
if ($this->isUsingSqlite()) {
$this->markTestSkipped('SQLite doesn\'t support JSON contains queries');
}

Expand All @@ -428,7 +428,7 @@ public function entries_are_found_using_where_json_doesnt_contain()
/** @test **/
public function entries_are_found_using_or_where_json_contains()
{
if (config('database.default') === 'sqlite') {
if ($this->isUsingSqlite()) {
$this->markTestSkipped('SQLite doesn\'t support JSON contains queries');
}

Expand All @@ -447,7 +447,7 @@ public function entries_are_found_using_or_where_json_contains()
/** @test **/
public function entries_are_found_using_or_where_json_doesnt_contain()
{
if (config('database.default') === 'sqlite') {
if ($this->isUsingSqlite()) {
$this->markTestSkipped('SQLite doesn\'t support JSON contains queries');
}

Expand Down
8 changes: 4 additions & 4 deletions tests/Data/Taxonomies/TermQueryBuilderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ private function createWhereDateTestTerms()
/** @test **/
public function terms_are_found_using_where_json_contains()
{
if (config('database.default') === 'sqlite') {
if ($this->isUsingSqlite()) {
$this->markTestSkipped('SQLite doesn\'t support JSON contains queries');
}

Expand All @@ -506,7 +506,7 @@ public function terms_are_found_using_where_json_contains()
/** @test **/
public function terms_are_found_using_where_json_doesnt_contain()
{
if (config('database.default') === 'sqlite') {
if ($this->isUsingSqlite()) {
$this->markTestSkipped('SQLite doesn\'t support JSON contains queries');
}

Expand All @@ -531,7 +531,7 @@ public function terms_are_found_using_where_json_doesnt_contain()
/** @test **/
public function terms_are_found_using_or_where_json_contains()
{
if (config('database.default') === 'sqlite') {
if ($this->isUsingSqlite()) {
$this->markTestSkipped('SQLite doesn\'t support JSON contains queries');
}

Expand All @@ -551,7 +551,7 @@ public function terms_are_found_using_or_where_json_contains()
/** @test **/
public function terms_are_found_using_or_where_json_doesnt_contain()
{
if (config('database.default') === 'sqlite') {
if ($this->isUsingSqlite()) {
$this->markTestSkipped('SQLite doesn\'t support JSON contains queries');
}

Expand Down
7 changes: 7 additions & 0 deletions tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -211,4 +211,11 @@ public function runMigrationsForUUIDEntries()
$migration = require __DIR__.'/../database/migrations/create_entries_table_with_string_ids.php.stub';
$migration->up();
}

protected function isUsingSqlite()
{
$connection = config('database.default');

return config("database.connections.{$connection}.driver") === 'sqlite';
}
}