File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed
src/Symfony/Bridge/Twig/Tests/Translation Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -74,14 +74,26 @@ public function getExtractData()
74
74
/**
75
75
* @expectedException \Twig_Error
76
76
* @expectedExceptionMessageRegExp /Unclosed "block" in "extractor(\/|\\)syntax_error\.twig" at line 1/
77
+ * @dataProvider resourcesWithSyntaxErrorsProvider
77
78
*/
78
- public function testExtractSyntaxError ()
79
+ public function testExtractSyntaxError ($ resources )
79
80
{
80
81
$ twig = new \Twig_Environment (new \Twig_Loader_Array (array ()));
81
82
$ twig ->addExtension (new TranslationExtension ($ this ->getMock ('Symfony\Component\Translation\TranslatorInterface ' )));
82
83
83
84
$ extractor = new TwigExtractor ($ twig );
84
- $ extractor ->extract (__DIR__ .'/../Fixtures ' , new MessageCatalogue ('en ' ));
85
+ $ extractor ->extract ($ resources , new MessageCatalogue ('en ' ));
86
+ }
87
+
88
+ /**
89
+ * @return array
90
+ */
91
+ public function resourcesWithSyntaxErrorsProvider ()
92
+ {
93
+ return array (
94
+ array (__DIR__ .'/../Fixtures ' ),
95
+ array (new \SplFileInfo (__DIR__ .'/../Fixtures/extractor/syntax_error.twig ' )),
96
+ );
85
97
}
86
98
87
99
/**
You can’t perform that action at this time.
0 commit comments