Code Duplication    Length = 19-19 lines in 2 locations

Tests/EloquentSettingRepositoryTest.php 2 locations

@@ 11-29 (lines=19) @@
8
    }
9
10
    /** @test */
11
    public function it_creates_translated_setting()
12
    {
13
        // Prepare
14
        $data = [
15
            'core::site-name' => [
16
                'en' => 'AsgardCMS_en',
17
                'fr' => 'AsgardCMS_fr',
18
            ],
19
        ];
20
21
        // Run
22
        $this->settingRepository->createOrUpdate($data);
23
24
        // Assert
25
        $setting = $this->settingRepository->find(1);
26
        $this->assertEquals('core::site-name', $setting->name);
27
        $this->assertEquals('AsgardCMS_en', $setting->translate('en')->value);
28
        $this->assertEquals('AsgardCMS_fr', $setting->translate('fr')->value);
29
    }
30
31
    /** @test */
32
    public function it_creates_plain_setting()
@@ 49-67 (lines=19) @@
46
    }
47
48
    /** @test */
49
    public function it_finds_setting_by_name()
50
    {
51
        // Prepare
52
        $data = [
53
            'core::site-name' => [
54
                'en' => 'AsgardCMS_en',
55
                'fr' => 'AsgardCMS_fr',
56
            ],
57
        ];
58
59
        // Run
60
        $this->settingRepository->createOrUpdate($data);
61
62
        // Assert
63
        $setting = $this->settingRepository->findByName('core::site-name');
64
        $this->assertEquals('core::site-name', $setting->name);
65
        $this->assertEquals('AsgardCMS_en', $setting->translate('en')->value);
66
        $this->assertEquals('AsgardCMS_fr', $setting->translate('fr')->value);
67
    }
68
69
    /** @test */
70
    public function it_returns_module_settings()