Code Duplication    Length = 19-19 lines in 2 locations

Tests/SettingsTest.php 2 locations

@@ 17-35 (lines=19) @@
14
    }
15
16
    /** @test */
17
    public function it_gets_a_setting_without_locale()
18
    {
19
        // Prepare
20
        $data = [
21
            'core::site-name' => [
22
                'en' => 'AsgardCMS_en',
23
                'fr' => 'AsgardCMS_fr',
24
            ],
25
            'core::template' => 'asgard',
26
            'blog::posts-per-page' => 10,
27
        ];
28
29
        // Run
30
        $this->settingRepository->createOrUpdate($data);
31
32
        // Assert
33
        $setting = $this->setting->get('core::site-name');
34
        $this->assertEquals('AsgardCMS_en', $setting);
35
    }
36
37
    /** @test */
38
    public function it_gets_setting_in_given_locale()
@@ 38-56 (lines=19) @@
35
    }
36
37
    /** @test */
38
    public function it_gets_setting_in_given_locale()
39
    {
40
        // Prepare
41
        $data = [
42
            'core::site-name' => [
43
                'en' => 'AsgardCMS_en',
44
                'fr' => 'AsgardCMS_fr',
45
            ],
46
            'core::template' => 'asgard',
47
            'blog::posts-per-page' => 10,
48
        ];
49
50
        // Run
51
        $this->settingRepository->createOrUpdate($data);
52
53
        // Assert
54
        $setting = $this->setting->get('core::site-name', 'fr');
55
        $this->assertEquals('AsgardCMS_fr', $setting);
56
    }
57
58
    /** @test */
59
    public function it_returns_a_default_value_if_no_setting_found()