Code Duplication    Length = 14-16 lines in 3 locations

module/Installer/test/Config/Plugin/ApplicationConfigCustomizerTest.php 2 locations

@@ 35-48 (lines=14) @@
32
    /**
33
     * @test
34
     */
35
    public function configIsRequestedToTheUser()
36
    {
37
        $ask = $this->io->ask(Argument::cetera())->willReturn('the_secret');
38
        $config = new CustomizableAppConfig();
39
40
        $this->plugin->process($this->io->reveal(), $config);
41
42
        $this->assertTrue($config->hasApp());
43
        $this->assertEquals([
44
            'SECRET' => 'the_secret',
45
            'DISABLE_TRACK_PARAM' => 'the_secret',
46
        ], $config->getApp());
47
        $ask->shouldHaveBeenCalledTimes(2);
48
    }
49
50
    /**
51
     * @test
@@ 75-90 (lines=16) @@
72
    /**
73
     * @test
74
     */
75
    public function existingValueIsKeptIfRequested()
76
    {
77
        $confirm = $this->io->confirm(Argument::cetera())->willReturn(true);
78
79
        $config = new CustomizableAppConfig();
80
        $config->setApp([
81
            'SECRET' => 'foo',
82
        ]);
83
84
        $this->plugin->process($this->io->reveal(), $config);
85
86
        $this->assertEquals([
87
            'SECRET' => 'foo',
88
        ], $config->getApp());
89
        $confirm->shouldHaveBeenCalledTimes(1);
90
    }
91
}
92

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

@@ 34-47 (lines=14) @@
31
    /**
32
     * @test
33
     */
34
    public function configIsRequestedToTheUser()
35
    {
36
        $ask = $this->io->choice(Argument::cetera())->willReturn('en');
37
        $config = new CustomizableAppConfig();
38
39
        $this->plugin->process($this->io->reveal(), $config);
40
41
        $this->assertTrue($config->hasLanguage());
42
        $this->assertEquals([
43
            'DEFAULT' => 'en',
44
            'CLI' => 'en',
45
        ], $config->getLanguage());
46
        $ask->shouldHaveBeenCalledTimes(2);
47
    }
48
49
    /**
50
     * @test