Skip to content

Commit 9801a28

Browse files
committed
Fix static usage in test
1 parent c1a0dc3 commit 9801a28

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/TwigComponent/tests/Integration/Twig/ComponentParserTest.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
1515
use Twig\Environment;
16+
use Twig\Error\SyntaxError;
1617
use Twig\Loader\ArrayLoader;
1718
use Twig\TemplateWrapper;
1819

@@ -28,33 +29,33 @@ final class ComponentParserTest extends KernelTestCase
2829
*/
2930
public function testAcceptTwigComponentTagWithValidComponentName(string $name): void
3031
{
31-
$environment = self::createEnvironment();
32+
$environment = $this->createEnvironment();
3233
$source = str_replace('XXX', $name, "{% component 'XXX' %}{% endcomponent %}");
3334

3435
$template = $environment->createTemplate($source);
3536

36-
self::assertInstanceOf(TemplateWrapper::class, $template);
37+
$this->assertInstanceOf(TemplateWrapper::class, $template);
3738
}
3839

3940
/**
4041
* @dataProvider provideValidComponentNames
4142
*/
4243
public function testAcceptHtmlComponentTagWithValidComponentName(string $name): void
4344
{
44-
$environment = self::createEnvironment();
45+
$environment = $this->createEnvironment();
4546
$source = \sprintf('<twig:%s></twig:%s>', $name, $name);
4647

4748
$template = $environment->createTemplate($source);
4849

49-
self::assertInstanceOf(TemplateWrapper::class, $template);
50+
$this->assertInstanceOf(TemplateWrapper::class, $template);
5051
}
5152

5253
/**
5354
* @dataProvider provideValidComponentNames
5455
*/
5556
public function testAcceptHtmlSelfClosingComponentTagWithValidComponentName(string $name): void
5657
{
57-
$environment = self::createEnvironment();
58+
$environment = $this->createEnvironment();
5859
$source = \sprintf('<twig:%s />', $name);
5960

6061
$template = $environment->createTemplate($source);

0 commit comments

Comments
 (0)