Code Duplication    Length = 15-15 lines in 2 locations

tests/view/SSViewerTest.php 2 locations

@@ 1469-1483 (lines=15) @@
1466
		}
1467
	}
1468
1469
	public function testClosedBlockExtension() {
1470
		$count = 0;
1471
		$parser = new SSTemplateParser();
1472
		$parser->addClosedBlock(
1473
			'test',
1474
			function (&$res) use (&$count) {
1475
				$count++;
1476
			}
1477
		);
1478
1479
		$template = new SSViewer_FromString("<% test %><% end_test %>", $parser);
1480
		$template->process(new SSViewerTestFixture());
1481
1482
		$this->assertEquals(1, $count);
1483
	}
1484
1485
	public function testOpenBlockExtension() {
1486
		$count = 0;
@@ 1485-1499 (lines=15) @@
1482
		$this->assertEquals(1, $count);
1483
	}
1484
1485
	public function testOpenBlockExtension() {
1486
		$count = 0;
1487
		$parser = new SSTemplateParser();
1488
		$parser->addOpenBlock(
1489
			'test',
1490
			function (&$res) use (&$count) {
1491
				$count++;
1492
			}
1493
		);
1494
1495
		$template = new SSViewer_FromString("<% test %>", $parser);
1496
		$template->process(new SSViewerTestFixture());
1497
1498
		$this->assertEquals(1, $count);
1499
	}
1500
1501
	/**
1502
	 * Tests if caching for SSViewer_FromString is working