File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
src/Symfony/Bundle/TwigBundle/Tests/Functional Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change 16
16
use Symfony \Component \Config \Loader \LoaderInterface ;
17
17
use Symfony \Component \DependencyInjection \ContainerBuilder ;
18
18
use Symfony \Component \ErrorRenderer \ErrorRenderer ;
19
+ use Symfony \Component \Filesystem \Filesystem ;
19
20
use Symfony \Component \HttpKernel \Kernel ;
20
21
21
22
class EmptyAppTest extends TestCase
@@ -28,6 +29,26 @@ public function testBootEmptyApp()
28
29
$ this ->assertTrue ($ kernel ->getContainer ()->hasParameter ('twig.default_path ' ));
29
30
$ this ->assertNotEmpty ($ kernel ->getContainer ()->getParameter ('twig.default_path ' ));
30
31
}
32
+
33
+ protected function setUp ()
34
+ {
35
+ $ this ->deleteTempDir ();
36
+ }
37
+
38
+ protected function tearDown ()
39
+ {
40
+ $ this ->deleteTempDir ();
41
+ }
42
+
43
+ private function deleteTempDir ()
44
+ {
45
+ if (!file_exists ($ dir = sys_get_temp_dir ().'/ ' .Kernel::VERSION .'/EmptyAppKernel ' )) {
46
+ return ;
47
+ }
48
+
49
+ $ fs = new Filesystem ();
50
+ $ fs ->remove ($ dir );
51
+ }
31
52
}
32
53
33
54
class EmptyAppKernel extends Kernel
You can’t perform that action at this time.
0 commit comments