@@ -102,8 +102,10 @@ class PugSymfonyEngineTest extends KernelTestCase
102
102
{
103
103
private static function clearCache ()
104
104
{
105
- if (is_dir (__DIR__ . '/../project/app/cache ' )) {
106
- (new Filesystem ())->remove (__DIR__ . '/../project/app/cache ' );
105
+ foreach (['app ' , 'var ' ] as $ directory ) {
106
+ if (is_dir ($ path = __DIR__ . "/../project/ $ directory/cache " )) {
107
+ (new Filesystem ())->remove ($ path );
108
+ }
107
109
}
108
110
}
109
111
@@ -188,6 +190,7 @@ public function testSecurityToken()
188
190
189
191
public function testLogoutHelper ()
190
192
{
193
+ self ::clearCache ();
191
194
$ logoutUrlHelper = new LogoutUrlHelper (new LogoutUrlGenerator ());
192
195
self ::$ kernel ->getContainer ()->set ('templating.helper.logout_url ' , $ logoutUrlHelper );
193
196
$ pugSymfony = new PugSymfonyEngine (self ::$ kernel );
@@ -197,6 +200,7 @@ public function testLogoutHelper()
197
200
198
201
public function testCustomHelper ()
199
202
{
203
+ self ::clearCache ();
200
204
$ helper = new CustomHelper ();
201
205
$ kernel = new TestKernel (function (Container $ container ) {
202
206
$ container ->setParameter ('pug ' , [
@@ -252,8 +256,12 @@ public function testBundleView()
252
256
self ::assertSame ('<section>World</section> ' , trim ($ pugSymfony ->render ('TestBundle:directory:file.pug ' )));
253
257
}
254
258
259
+ /**
260
+ * @group i
261
+ */
255
262
public function testAssetHelperPhp ()
256
263
{
264
+ self ::clearCache ();
257
265
$ pugSymfony = new PugSymfonyEngine (self ::$ kernel );
258
266
$ pugSymfony ->setOption ('expressionLanguage ' , 'php ' );
259
267
@@ -276,6 +284,7 @@ public function testAssetHelperPhp()
276
284
277
285
public function testAssetHelperJs ()
278
286
{
287
+ self ::clearCache ();
279
288
$ pugSymfony = new PugSymfonyEngine (self ::$ kernel );
280
289
$ pugSymfony ->setOption ('expressionLanguage ' , 'js ' );
281
290
0 commit comments