blob: 43d622b8fcaae19ac1aa7b423b0d8221695b1dce (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
|
<?php
/**
* Smarty PHPunit tests of generic getter/setter
*
* @author Uwe Tews
*/
/**
* class for generic getter/setter tests
*
*
*
*
*/
class GetterSetterTest extends PHPUnit_Smarty
{
public function setUp(): void
{
$this->setUpSmarty(__DIR__);
}
public function testInit()
{
$this->cleanDirs();
}
/**
* test setter on Smarty object
*/
public function testSmartySetter()
{
$this->smarty->setLeftDelimiter('<{');
$this->smarty->setRightDelimiter('}>');
$this->assertEquals('<{', $this->smarty->getLeftDelimiter());
$this->assertEquals('}>', $this->smarty->getRightDelimiter());
}
/**
* test getter on Smarty object
*/
public function testSmartyGetter()
{
$this->smarty->setLeftDelimiter('<{');
$this->smarty->setRightDelimiter('}>');
$this->assertEquals('<{', $this->smarty->getLeftDelimiter());
$this->assertEquals('}>', $this->smarty->getRightDelimiter());
}
/**
* test setter on Template object
*/
public function testTemplateSetter()
{
$tpl = $this->smarty->createTemplate('helloworld.tpl');
$tpl->setLeftDelimiter('<{');
$tpl->setRightDelimiter('}>');
$this->assertEquals('<{', $tpl->getLeftDelimiter());
$this->assertEquals('}>', $tpl->getRightDelimiter());
$this->assertEquals('{', $this->smarty->getLeftDelimiter());
$this->assertEquals('}', $this->smarty->getRightDelimiter());
}
/**
* test getter on Template object
*/
public function testTemplateGetter()
{
$tpl = $this->smarty->createTemplate('helloworld.tpl');
$tpl->setLeftDelimiter('<{');
$tpl->setRightDelimiter('}>');
$this->assertEquals('<{', $tpl->getLeftDelimiter());
$this->assertEquals('}>', $tpl->getRightDelimiter());
}
}
|