-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(tests): Add tests for MatchKitsFacade to ensu
- Loading branch information
1 parent
76a8edd
commit 0ef9ef5
Showing
1 changed file
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
|
||
namespace Tests\Unit; | ||
|
||
use Tests\TestCase; | ||
use App\Facades\MatchKitsFacade; | ||
use LiburuGenealogy\PhpDna\Matchkits; | ||
use Illuminate\Support\Facades\App; | ||
|
||
class MatchKitsFacadeTest extends TestCase | ||
{ | ||
public function test_facade_resolves_to_matchkits_instance() | ||
{ | ||
$matchKitsInstance = App::make('matchKits'); | ||
$this->assertInstanceOf(Matchkits::class, $matchKitsInstance); | ||
} | ||
|
||
public function test_process_method_is_callable_via_facade() | ||
{ | ||
$matchKitsMock = \Mockery::mock(Matchkits::class); | ||
$matchKitsMock->shouldReceive('process')->once()->andReturnTrue(); | ||
|
||
App::instance('matchKits', $matchKitsMock); | ||
|
||
$result = MatchKitsFacade::process(); | ||
$this->assertTrue($result); | ||
} | ||
} |