Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip tests if there are no packages installed #77

Merged
merged 1 commit into from
Jan 30, 2024
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
2 changes: 1 addition & 1 deletion tests/Api/ProjectSolutionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use EscolaLms\Courses\Models\Course;
use EscolaLms\Courses\Models\Lesson;
use EscolaLms\Courses\Models\Topic;
use EscolaLms\Tasks\Tests\CreatesUsers;
use EscolaLms\Core\Tests\CreatesUsers;
use EscolaLms\Templates\Listeners\TemplateEventListener;
use EscolaLms\TemplatesEmail\Core\EmailMailable;
use EscolaLms\TemplatesEmail\Tests\TestCase;
Expand Down
2 changes: 1 addition & 1 deletion tests/Api/TaskTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
use EscolaLms\Tasks\Events\TaskNoteCreatedEvent;
use EscolaLms\Tasks\Models\Task;
use EscolaLms\Tasks\Models\TaskNote;
use EscolaLms\Tasks\Tests\CreatesUsers;
use EscolaLms\Core\Tests\CreatesUsers;
use EscolaLms\Templates\Listeners\TemplateEventListener;
use EscolaLms\TemplatesEmail\Core\EmailMailable;
use EscolaLms\TemplatesEmail\Tests\TestCase;
Expand Down
11 changes: 10 additions & 1 deletion tests/Feature/TaskTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use EscolaLms\Tasks\Events\TaskOverdueEvent;
use EscolaLms\Tasks\Models\Task;
use EscolaLms\Tasks\Tests\CreatesUsers;
use EscolaLms\Core\Tests\CreatesUsers;
use EscolaLms\TemplatesEmail\Core\EmailMailable;
use EscolaLms\TemplatesEmail\Tests\TestCase;
use Illuminate\Foundation\Testing\DatabaseTransactions;
Expand All @@ -16,6 +16,15 @@ class TaskTest extends TestCase
{
use CreatesUsers, DatabaseTransactions;

public function setUp(): void
{
parent::setUp();

if (!class_exists(\EscolaLms\Tasks\EscolaLmsTasksServiceProvider::class)) {
$this->markTestSkipped('Task package not installed');
}
}

public function testNotificationSentWhenTaskIsOverdue(): void
{
Mail::fake();
Expand Down
8 changes: 8 additions & 0 deletions tests/Feature/VideoTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@ class VideoTest extends TestCase
{
use DatabaseTransactions, CreatesUsers;

public function setUp(): void
{
parent::setUp();

if (!class_exists(\EscolaLms\Video\EscolaLmsVideoServiceProvider::class)) {
$this->markTestSkipped('Video package not installed');
}
}
public function testNotificationSentWhenVideoProcessingStarted(): void
{
Mail::fake();
Expand Down
Loading