A free open source IT asset/license management system
Added markIncompleteIfSqlite() method
snipe5e15cc3bbe42
diff --git a/tests/Feature/Users/Api/UserSearchTest.php b/tests/Feature/Users/Api/UserSearchTest.phpindex fba18e67ea..dc0ffdc803 100644--- a/tests/Feature/Users/Api/UserSearchTest.php+++ b/tests/Feature/Users/Api/UserSearchTest.php@@ -147,6 +147,8 @@ class UserSearchTest extends TestCasepublic function testUsersIndexWhenInvalidSortFieldIsPassed(){+ $this->markIncompleteIfSqlite('This test is not compatible with SQLite');+$this->actingAsForApi(User::factory()->viewUsers()->create())->getJson(route('api.users.index', ['sort' => 'assets',diff --git a/tests/Support/CanSkipTests.php b/tests/Support/CanSkipTests.phpindex 2a1eec10fc..b29fdf88cd 100644--- a/tests/Support/CanSkipTests.php+++ b/tests/Support/CanSkipTests.php@@ -10,4 +10,11 @@ trait CanSkipTests$this->markTestIncomplete($message);}}++ public function markIncompleteIfSqlite($message = 'Test skipped due to database driver being sqlite.')+ {+ if (config('database.default') === 'sqlite') {+ $this->markTestIncomplete($message);+ }+ }}