Code Duplication    Length = 19-19 lines in 3 locations

tests/FwlibTest/Bridge/SmartyTest.php 3 locations

@@ 22-40 (lines=19) @@
19
    }
20
21
22
    public function testAddConfigDirPrepend()
23
    {
24
        $smarty = $this->buildMock();
25
26
        $dir = $smarty->getConfigDir();
27
        $dirCount = count($dir);
28
29
        $smarty->addConfigDirPrepend('foo/');
30
31
        $dir = $smarty->getConfigDir();
32
        $this->assertEquals($dirCount + 1, count($dir));
33
        $this->assertEquals('foo/', $dir['']);
34
35
36
        // Add again to check key overwrite
37
        $smarty->addConfigDirPrepend('bar/');
38
        $dir = $smarty->getConfigDir();
39
        $this->assertEquals('bar/', $dir['']);
40
    }
41
42
43
    public function testAddPluginsDirPrepend()
@@ 43-61 (lines=19) @@
40
    }
41
42
43
    public function testAddPluginsDirPrepend()
44
    {
45
        $smarty = $this->buildMock();
46
47
        $dir = $smarty->getPluginsDir();
48
        $dirCount = count($dir);
49
50
        $smarty->addPluginsDirPrepend('foo/');
51
52
        $dir = $smarty->getPluginsDir();
53
        $this->assertEquals($dirCount + 1, count($dir));
54
        $this->assertEquals('foo/', $dir['']);
55
56
57
        // Add again to check key overwrite
58
        $smarty->addPluginsDirPrepend('bar/');
59
        $dir = $smarty->getPluginsDir();
60
        $this->assertEquals('bar/', $dir['']);
61
    }
62
63
64
    public function testAddTemplateDirPrepend()
@@ 64-82 (lines=19) @@
61
    }
62
63
64
    public function testAddTemplateDirPrepend()
65
    {
66
        $smarty = $this->buildMock();
67
68
        $dir = $smarty->getTemplateDir();
69
        $dirCount = count($dir);
70
71
        $smarty->addTemplateDirPrepend('foo/');
72
73
        $dir = $smarty->getTemplateDir();
74
        $this->assertEquals($dirCount + 1, count($dir));
75
        $this->assertEquals('foo/', $dir['']);
76
77
78
        // Add again to check key overwrite
79
        $smarty->addTemplateDirPrepend('bar/');
80
        $dir = $smarty->getTemplateDir();
81
        $this->assertEquals('bar/', $dir['']);
82
    }
83
}
84