| @@ 27-46 (lines=20) @@ | ||
| 24 | use Rossmitchell\Twofactor\Tests\Integration\Abstracts\AbstractTestClass; |
|
| 25 | use Rossmitchell\Twofactor\Tests\Integration\FixtureLoader\Traits\ConfigurationLoader; |
|
| 26 | ||
| 27 | class OptionShouldNotShowWhenDisabledTest extends AbstractTestClass |
|
| 28 | { |
|
| 29 | use ConfigurationLoader; |
|
| 30 | ||
| 31 | public static function getConfigurationDataPath() |
|
| 32 | { |
|
| 33 | return __DIR__.'/../_files/two_factor_disabled.php'; |
|
| 34 | } |
|
| 35 | ||
| 36 | /** |
|
| 37 | * @magentoDbIsolation enabled |
|
| 38 | * @magentoDataFixture loadConfiguration |
|
| 39 | */ |
|
| 40 | public function testUseTwoFactorIsDisplayed() |
|
| 41 | { |
|
| 42 | $this->dispatch('/customer/account/create'); |
|
| 43 | $body = $this->getResponse()->getBody(); |
|
| 44 | $this->assertNotContains('Use Two Factor Authentication', $body); |
|
| 45 | } |
|
| 46 | } |
|
| 47 | ||
| @@ 27-46 (lines=20) @@ | ||
| 24 | use Rossmitchell\Twofactor\Tests\Integration\Abstracts\AbstractTestClass; |
|
| 25 | use Rossmitchell\Twofactor\Tests\Integration\FixtureLoader\Traits\ConfigurationLoader; |
|
| 26 | ||
| 27 | class OptionShouldShowWhenEnabledTest extends AbstractTestClass |
|
| 28 | { |
|
| 29 | use ConfigurationLoader; |
|
| 30 | ||
| 31 | public static function getConfigurationDataPath() |
|
| 32 | { |
|
| 33 | return __DIR__.'/../_files/two_factor_enabled.php'; |
|
| 34 | } |
|
| 35 | ||
| 36 | /** |
|
| 37 | * @magentoDbIsolation enabled |
|
| 38 | * @magentoDataFixture loadConfiguration |
|
| 39 | */ |
|
| 40 | public function testUseTwoFactorIsDisplayed() |
|
| 41 | { |
|
| 42 | $this->dispatch('/customer/account/create'); |
|
| 43 | $body = $this->getResponse()->getBody(); |
|
| 44 | $this->assertContains('Use Two Factor Authentication', $body); |
|
| 45 | } |
|
| 46 | } |
|
| 47 | ||