mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-16 14:48:11 +00:00
Improve test coverage.
This commit is contained in:
@@ -22,12 +22,13 @@ declare(strict_types=1);
|
||||
|
||||
namespace Tests\Feature\Controllers\Auth;
|
||||
|
||||
use FireflyIII\Models\Configuration;
|
||||
use FireflyIII\Models\Preference;
|
||||
use Google2FA;
|
||||
use Log;
|
||||
use Preferences;
|
||||
use Tests\TestCase;
|
||||
|
||||
use FireflyConfig;
|
||||
/**
|
||||
* Class TwoFactorControllerTest
|
||||
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
|
||||
@@ -54,6 +55,11 @@ class TwoFactorControllerTest extends TestCase
|
||||
$langPreference = new Preference;
|
||||
$langPreference->data = 'en_US';
|
||||
|
||||
$falseConfig = new Configuration;
|
||||
$falseConfig->data = false;
|
||||
|
||||
FireflyConfig::shouldReceive('get')->withArgs(['is_demo_site', false])->andReturn($falseConfig);
|
||||
|
||||
Preferences::shouldReceive('get')->withArgs(['language', 'en_US'])->andReturn($langPreference);
|
||||
|
||||
$response = $this->get(route('two-factor.lost'));
|
||||
|
||||
Reference in New Issue
Block a user