Code Duplication    Length = 27-29 lines in 2 locations

src/Tests/Integration/Admin/EnterCodePage/EnabledForSystemDisabledForCustomerTest.php 1 location

@@ 29-55 (lines=27) @@
26
use Rossmitchell\Twofactor\Tests\Integration\FixtureLoader\Traits\ConfigurationLoader;
27
use Rossmitchell\Twofactor\Tests\Integration\FixtureLoader\Traits\CustomerLoader;
28
29
class EnabledForSystemDisabledForCustomerTest extends AbstractTestClass
30
{
31
    use AdminUserLoader;
32
    use ConfigurationLoader;
33
34
    public static function getAdminUserDataPath()
35
    {
36
        return __DIR__ . '/../_files/adminUser.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   loadAdminUsers
47
     * @magentoDataFixture   loadConfiguration
48
     */
49
    public function testPageRedirectsCorrectly()
50
    {
51
        $this->loginAdmin('two_factor_disabled');
52
        $this->dispatch('/backend/twofactor/adminlogin/index');
53
        $this->assertRedirect($this->stringContains('admin/dashboard/index'));
54
    }
55
}
56

src/Tests/Integration/Customer/OtherPageRedirection/EnableForSystemEnableForCustomerTest.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 EnableForSystemEnableForCustomerTest 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->login('[email protected]');
52
        $this->dispatch('/');
53
54
        $this->assertRedirect($this->stringContains('twofactor/customerlogin/index'));
55
    }
56
}
57