src/Tests/Integration/Customer/OtherPageRedirection/DisabledForSystemDisableForCustomerTest.php 1 location
|
@@ 28-57 (lines=30) @@
|
| 25 |
|
use Rossmitchell\Twofactor\Tests\Integration\FixtureLoader\Traits\ConfigurationLoader; |
| 26 |
|
use Rossmitchell\Twofactor\Tests\Integration\FixtureLoader\Traits\CustomerLoader; |
| 27 |
|
|
| 28 |
|
class DisabledForSystemDisableForCustomerTest extends AbstractTestClass |
| 29 |
|
{ |
| 30 |
|
|
| 31 |
|
use CustomerLoader; |
| 32 |
|
use ConfigurationLoader; |
| 33 |
|
|
| 34 |
|
public static function getCustomerDataPath() |
| 35 |
|
{ |
| 36 |
|
return __DIR__.'/../_files/customer.php'; |
| 37 |
|
} |
| 38 |
|
|
| 39 |
|
public static function getConfigurationDataPath() |
| 40 |
|
{ |
| 41 |
|
return __DIR__.'/../_files/two_factor_disabled.php'; |
| 42 |
|
} |
| 43 |
|
|
| 44 |
|
/** |
| 45 |
|
* @magentoDbIsolation disabled |
| 46 |
|
* @magentoDataFixture loadCustomer |
| 47 |
|
* @magentoDataFixture loadConfiguration |
| 48 |
|
*/ |
| 49 |
|
public function testNoRedirectToVerification() |
| 50 |
|
{ |
| 51 |
|
$this->login('[email protected]'); |
| 52 |
|
$this->dispatch('/'); |
| 53 |
|
|
| 54 |
|
$this->assertFalse($this->getResponse()->isRedirect()); |
| 55 |
|
} |
| 56 |
|
} |
| 57 |
|
|
src/Tests/Integration/Customer/OtherPageRedirection/DisabledForSystemEnableForCustomerTest.php 1 location
|
@@ 28-57 (lines=30) @@
|
| 25 |
|
use Rossmitchell\Twofactor\Tests\Integration\FixtureLoader\Traits\ConfigurationLoader; |
| 26 |
|
use Rossmitchell\Twofactor\Tests\Integration\FixtureLoader\Traits\CustomerLoader; |
| 27 |
|
|
| 28 |
|
class DisabledForSystemEnableForCustomerTest extends AbstractTestClass |
| 29 |
|
{ |
| 30 |
|
|
| 31 |
|
use CustomerLoader; |
| 32 |
|
use ConfigurationLoader; |
| 33 |
|
|
| 34 |
|
public static function getCustomerDataPath() |
| 35 |
|
{ |
| 36 |
|
return __DIR__.'/../_files/customer.php'; |
| 37 |
|
} |
| 38 |
|
|
| 39 |
|
public static function getConfigurationDataPath() |
| 40 |
|
{ |
| 41 |
|
return __DIR__.'/../_files/two_factor_disabled.php'; |
| 42 |
|
} |
| 43 |
|
|
| 44 |
|
/** |
| 45 |
|
* @magentoDbIsolation enabled |
| 46 |
|
* @magentoDataFixture loadCustomer |
| 47 |
|
* @magentoDataFixture loadConfiguration |
| 48 |
|
*/ |
| 49 |
|
public function testNoRedirectToVerification() |
| 50 |
|
{ |
| 51 |
|
$this->login('[email protected]'); |
| 52 |
|
$this->dispatch('/'); |
| 53 |
|
|
| 54 |
|
$this->assertFalse($this->getResponse()->isRedirect()); |
| 55 |
|
} |
| 56 |
|
} |
| 57 |
|
|
src/Tests/Integration/Customer/OtherPageRedirection/EnableForSystemDisabledForCustomerTest.php 1 location
|
@@ 28-58 (lines=31) @@
|
| 25 |
|
use Rossmitchell\Twofactor\Tests\Integration\FixtureLoader\Traits\ConfigurationLoader; |
| 26 |
|
use Rossmitchell\Twofactor\Tests\Integration\FixtureLoader\Traits\CustomerLoader; |
| 27 |
|
|
| 28 |
|
class EnableForSystemDisabledForCustomerTest extends AbstractTestClass |
| 29 |
|
{ |
| 30 |
|
|
| 31 |
|
use CustomerLoader; |
| 32 |
|
use ConfigurationLoader; |
| 33 |
|
|
| 34 |
|
public static function getCustomerDataPath() |
| 35 |
|
{ |
| 36 |
|
return __DIR__.'/../_files/customer.php'; |
| 37 |
|
} |
| 38 |
|
|
| 39 |
|
public static function getConfigurationDataPath() |
| 40 |
|
{ |
| 41 |
|
return __DIR__.'/../_files/two_factor_enabled.php'; |
| 42 |
|
} |
| 43 |
|
|
| 44 |
|
/** |
| 45 |
|
* @magentoDbIsolation enabled |
| 46 |
|
* @magentoDataFixture loadCustomer |
| 47 |
|
* @magentoDataFixture loadConfiguration |
| 48 |
|
*/ |
| 49 |
|
public function testNoRedirectToVerification() |
| 50 |
|
{ |
| 51 |
|
$this->login('[email protected]'); |
| 52 |
|
$this->dispatch('/'); |
| 53 |
|
|
| 54 |
|
$this->assertFalse($this->getResponse()->isRedirect()); |
| 55 |
|
} |
| 56 |
|
} |
| 57 |
|
|
src/Tests/Integration/Customer/OtherPageRedirection/DisabledForSystemNotLoggedInTest.php 1 location
|
@@ 28-56 (lines=29) @@
|
| 25 |
|
use Rossmitchell\Twofactor\Tests\Integration\FixtureLoader\Traits\ConfigurationLoader; |
| 26 |
|
use Rossmitchell\Twofactor\Tests\Integration\FixtureLoader\Traits\CustomerLoader; |
| 27 |
|
|
| 28 |
|
class DisabledForSystemNotLoggedInTest extends AbstractTestClass |
| 29 |
|
{ |
| 30 |
|
|
| 31 |
|
use CustomerLoader; |
| 32 |
|
use ConfigurationLoader; |
| 33 |
|
|
| 34 |
|
public static function getCustomerDataPath() |
| 35 |
|
{ |
| 36 |
|
return __DIR__.'/../_files/customer.php'; |
| 37 |
|
} |
| 38 |
|
|
| 39 |
|
public static function getConfigurationDataPath() |
| 40 |
|
{ |
| 41 |
|
return __DIR__.'/../_files/two_factor_disabled.php'; |
| 42 |
|
} |
| 43 |
|
|
| 44 |
|
/** |
| 45 |
|
* @magentoDbIsolation enabled |
| 46 |
|
* @magentoDataFixture loadCustomer |
| 47 |
|
* @magentoDataFixture loadConfiguration |
| 48 |
|
*/ |
| 49 |
|
public function testNoRedirectToVerification() |
| 50 |
|
{ |
| 51 |
|
$this->dispatch('/'); |
| 52 |
|
|
| 53 |
|
$this->assertFalse($this->getResponse()->isRedirect()); |
| 54 |
|
} |
| 55 |
|
} |
| 56 |
|
|
src/Tests/Integration/Customer/OtherPageRedirection/EnableForSystemNotLoggedInTest.php 1 location
|
@@ 28-56 (lines=29) @@
|
| 25 |
|
use Rossmitchell\Twofactor\Tests\Integration\FixtureLoader\Traits\ConfigurationLoader; |
| 26 |
|
use Rossmitchell\Twofactor\Tests\Integration\FixtureLoader\Traits\CustomerLoader; |
| 27 |
|
|
| 28 |
|
class EnableForSystemNotLoggedInTest extends AbstractTestClass |
| 29 |
|
{ |
| 30 |
|
|
| 31 |
|
use CustomerLoader; |
| 32 |
|
use ConfigurationLoader; |
| 33 |
|
|
| 34 |
|
public static function getCustomerDataPath() |
| 35 |
|
{ |
| 36 |
|
return __DIR__.'/../_files/customer.php'; |
| 37 |
|
} |
| 38 |
|
|
| 39 |
|
public static function getConfigurationDataPath() |
| 40 |
|
{ |
| 41 |
|
return __DIR__.'/../_files/two_factor_enabled.php'; |
| 42 |
|
} |
| 43 |
|
|
| 44 |
|
/** |
| 45 |
|
* @magentoDbIsolation enabled |
| 46 |
|
* @magentoDataFixture loadCustomer |
| 47 |
|
* @magentoDataFixture loadConfiguration |
| 48 |
|
*/ |
| 49 |
|
public function testRedirectToVerification() |
| 50 |
|
{ |
| 51 |
|
$this->dispatch('/'); |
| 52 |
|
|
| 53 |
|
$this->assertFalse($this->getResponse()->isRedirect()); |
| 54 |
|
} |
| 55 |
|
} |
| 56 |
|
|
src/Tests/Integration/Customer/EnterCodePage/EnabledForSystemDisabledForCustomerTest.php 1 location
|
@@ 28-54 (lines=27) @@
|
| 25 |
|
use Rossmitchell\Twofactor\Tests\Integration\FixtureLoader\Traits\ConfigurationLoader; |
| 26 |
|
use Rossmitchell\Twofactor\Tests\Integration\FixtureLoader\Traits\CustomerLoader; |
| 27 |
|
|
| 28 |
|
class EnabledForSystemDisabledForCustomerTest extends AbstractTestClass |
| 29 |
|
{ |
| 30 |
|
use CustomerLoader; |
| 31 |
|
use ConfigurationLoader; |
| 32 |
|
|
| 33 |
|
public static function getCustomerDataPath() |
| 34 |
|
{ |
| 35 |
|
return __DIR__.'/../_files/customer.php'; |
| 36 |
|
} |
| 37 |
|
|
| 38 |
|
public static function getConfigurationDataPath() |
| 39 |
|
{ |
| 40 |
|
return __DIR__.'/../_files/two_factor_enabled.php'; |
| 41 |
|
} |
| 42 |
|
|
| 43 |
|
/** |
| 44 |
|
* @magentoDbIsolation enabled |
| 45 |
|
* @magentoDataFixture loadCustomer |
| 46 |
|
* @magentoDataFixture loadConfiguration |
| 47 |
|
*/ |
| 48 |
|
public function testPageLoadsCorrectly() |
| 49 |
|
{ |
| 50 |
|
$this->login('[email protected]'); |
| 51 |
|
$this->dispatch('/twofactor/customerlogin/index'); |
| 52 |
|
$this->assertRedirectsToHomePage(); |
| 53 |
|
} |
| 54 |
|
} |
| 55 |
|
|