13
13
14
14
use Symfony \Bundle \FrameworkBundle \Test \KernelTestCase ;
15
15
use Twig \Environment ;
16
+ use Twig \Error \SyntaxError ;
16
17
use Twig \Loader \ArrayLoader ;
17
18
use Twig \TemplateWrapper ;
18
19
@@ -28,33 +29,33 @@ final class ComponentParserTest extends KernelTestCase
28
29
*/
29
30
public function testAcceptTwigComponentTagWithValidComponentName (string $ name ): void
30
31
{
31
- $ environment = self :: createEnvironment ();
32
+ $ environment = $ this -> createEnvironment ();
32
33
$ source = str_replace ('XXX ' , $ name , "{% component 'XXX' %}{% endcomponent %} " );
33
34
34
35
$ template = $ environment ->createTemplate ($ source );
35
36
36
- self :: assertInstanceOf (TemplateWrapper::class, $ template );
37
+ $ this -> assertInstanceOf (TemplateWrapper::class, $ template );
37
38
}
38
39
39
40
/**
40
41
* @dataProvider provideValidComponentNames
41
42
*/
42
43
public function testAcceptHtmlComponentTagWithValidComponentName (string $ name ): void
43
44
{
44
- $ environment = self :: createEnvironment ();
45
+ $ environment = $ this -> createEnvironment ();
45
46
$ source = \sprintf ('<twig:%s></twig:%s> ' , $ name , $ name );
46
47
47
48
$ template = $ environment ->createTemplate ($ source );
48
49
49
- self :: assertInstanceOf (TemplateWrapper::class, $ template );
50
+ $ this -> assertInstanceOf (TemplateWrapper::class, $ template );
50
51
}
51
52
52
53
/**
53
54
* @dataProvider provideValidComponentNames
54
55
*/
55
56
public function testAcceptHtmlSelfClosingComponentTagWithValidComponentName (string $ name ): void
56
57
{
57
- $ environment = self :: createEnvironment ();
58
+ $ environment = $ this -> createEnvironment ();
58
59
$ source = \sprintf ('<twig:%s /> ' , $ name );
59
60
60
61
$ template = $ environment ->createTemplate ($ source );
0 commit comments