Code Duplication    Length = 15-15 lines in 2 locations

tests/php/View/SSViewerTest.php 2 locations

@@ 1966-1980 (lines=15) @@
1963
        );
1964
    }
1965
1966
    public function testClosedBlockExtension()
1967
    {
1968
        $count = 0;
1969
        $parser = new SSTemplateParser();
1970
        $parser->addClosedBlock(
1971
            'test',
1972
            function ($res) use (&$count) {
1973
                $count++;
1974
            }
1975
        );
1976
1977
        $template = new SSViewer_FromString("<% test %><% end_test %>", $parser);
1978
        $template->process(new SSViewerTest\TestFixture());
1979
1980
        $this->assertEquals(1, $count);
1981
    }
1982
1983
    public function testOpenBlockExtension()
@@ 1983-1997 (lines=15) @@
1980
        $this->assertEquals(1, $count);
1981
    }
1982
1983
    public function testOpenBlockExtension()
1984
    {
1985
        $count = 0;
1986
        $parser = new SSTemplateParser();
1987
        $parser->addOpenBlock(
1988
            'test',
1989
            function ($res) use (&$count) {
1990
                $count++;
1991
            }
1992
        );
1993
1994
        $template = new SSViewer_FromString("<% test %>", $parser);
1995
        $template->process(new SSViewerTest\TestFixture());
1996
1997
        $this->assertEquals(1, $count);
1998
    }
1999
2000
    /**