File tree Expand file tree Collapse file tree 2 files changed +57
-0
lines changed Expand file tree Collapse file tree 2 files changed +57
-0
lines changed Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ /*
4
+ * This file is part of Spoon Library.
5
+ *
6
+ * (c) Davy Hellemans <[email protected] >
7
+ *
8
+ * For the full copyright and license information, please view the license
9
+ * file that was distributed with this source code.
10
+ */
11
+
12
+ namespace Spoon \Template \Tests ;
13
+ use Spoon \Template \Autoloader ;
14
+ use Spoon \Template \Environment ;
15
+ use Spoon \Template \Template ;
16
+ use Spoon \Template \Compiler ;
17
+
18
+ require_once realpath (dirname (__FILE__ ) . '/../ ' ) . '/Autoloader.php ' ;
19
+ require_once 'PHPUnit/Framework/TestCase.php ' ;
20
+
21
+ class CompilerTest extends \PHPUnit_Framework_TestCase
22
+ {
23
+ protected $ path ;
24
+
25
+ /**
26
+ * @var Spoon\Template\Template
27
+ */
28
+ protected $ template ;
29
+
30
+ protected function setUp ()
31
+ {
32
+ Autoloader::register ();
33
+ $ this ->template = new Template (
34
+ new Environment (
35
+ array (
36
+ 'cache ' => dirname (__FILE__ ) . '/cache '
37
+ )
38
+ )
39
+ );
40
+ $ this ->path = dirname (__FILE__ ) . '/templates ' ;
41
+ }
42
+
43
+ protected function tearDown ()
44
+ {
45
+ $ this ->template = null ;
46
+ }
47
+
48
+ public function testCompileTextToken ()
49
+ {
50
+ $ compiler = new Compiler ($ this ->template , $ this ->path . '/text_token.tpl ' );
51
+ $ compiler ->write ();
52
+ $ this ->assertTrue (true );
53
+ }
54
+ }
Original file line number Diff line number Diff line change
1
+ Foobar is an expression that's often used as
2
+ dummy content. This to ensure people know that
3
+ this is test content and to avoid funky shizzle.
You can’t perform that action at this time.
0 commit comments