Code Duplication    Length = 18-19 lines in 2 locations

module/Installer/test/Config/Plugin/ApplicationConfigCustomizerTest.php 1 location

@@ 53-70 (lines=18) @@
50
    /**
51
     * @test
52
     */
53
    public function overwriteIsRequestedIfValueIsAlreadySet()
54
    {
55
        $ask = $this->io->ask(Argument::cetera())->willReturn('the_new_secret');
56
        $confirm = $this->io->confirm(Argument::cetera())->willReturn(false);
57
        $config = new CustomizableAppConfig();
58
        $config->setApp([
59
            'SECRET' => 'foo',
60
        ]);
61
62
        $this->plugin->process($this->io->reveal(), $config);
63
64
        $this->assertEquals([
65
            'SECRET' => 'the_new_secret',
66
            'DISABLE_TRACK_PARAM' => 'the_new_secret',
67
        ], $config->getApp());
68
        $ask->shouldHaveBeenCalledTimes(2);
69
        $confirm->shouldHaveBeenCalledTimes(1);
70
    }
71
72
    /**
73
     * @test

module/Installer/test/Config/Plugin/LanguageConfigCustomizerTest.php 1 location

@@ 52-70 (lines=19) @@
49
    /**
50
     * @test
51
     */
52
    public function overwriteIsRequestedIfValueIsAlreadySet()
53
    {
54
        $choice = $this->io->choice(Argument::cetera())->willReturn('es');
55
        $confirm = $this->io->confirm(Argument::cetera())->willReturn(false);
56
        $config = new CustomizableAppConfig();
57
        $config->setLanguage([
58
            'DEFAULT' => 'en',
59
            'CLI' => 'en',
60
        ]);
61
62
        $this->plugin->process($this->io->reveal(), $config);
63
64
        $this->assertEquals([
65
            'DEFAULT' => 'es',
66
            'CLI' => 'es',
67
        ], $config->getLanguage());
68
        $choice->shouldHaveBeenCalledTimes(2);
69
        $confirm->shouldHaveBeenCalledTimes(1);
70
    }
71
72
    /**
73
     * @test