2FAuth/tests/Unit/Events/TwoFAccountDeletedTest.php

31 lines
742 B
PHP
Raw Normal View History

2021-11-30 17:39:33 +01:00
<?php
namespace Tests\Unit\Events;
2021-12-02 13:15:53 +01:00
use App\Models\TwoFAccount;
2021-11-30 17:39:33 +01:00
use App\Events\TwoFAccountDeleted;
use Tests\TestCase;
use Mockery\MockInterface;
use App\Services\SettingService;
2021-11-30 17:39:33 +01:00
/**
* @covers \App\Events\TwoFAccountDeleted
*/
class TwoFAccountDeletedTest extends TestCase
{
/**
* @test
*/
public function test_event_constructor()
{
$settingService = $this->mock(SettingService::class, function (MockInterface $settingService) {
$settingService->shouldReceive('get')
->andReturn(false);
});
2021-12-02 13:15:53 +01:00
$twofaccount = TwoFAccount::factory()->make();
2021-11-30 17:39:33 +01:00
$event = new TwoFAccountDeleted($twofaccount);
$this->assertSame($twofaccount, $event->twofaccount);
}
}