-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update twig dependancy version to ~2.0 * Allow for BC twig > 1.23 * Clean unused attribute * Install gettext in CI * Remove hhvm (travis)
- Loading branch information
Showing
5 changed files
with
18 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,7 @@ | |
/** | ||
* @author Saša Stamenković <[email protected]> | ||
*/ | ||
class ExtractorTest extends \PHPUnit_Framework_TestCase | ||
class ExtractorTest extends \PHPUnit\Framework\TestCase | ||
{ | ||
/** | ||
* @var \Twig_Environment | ||
|
@@ -32,7 +32,9 @@ class ExtractorTest extends \PHPUnit_Framework_TestCase | |
|
||
protected function setUp() | ||
{ | ||
$this->twig = new \Twig_Environment(new Filesystem('/'), array( | ||
$filesystem = new Filesystem('/', __DIR__.'/Fixtures/twig'); | ||
$filesystem->prependPath(__DIR__.'/Fixtures/twig'); | ||
$this->twig = new \Twig_Environment($filesystem, array( | ||
'cache' => '/tmp/cache/'.uniqid(), | ||
'auto_reload' => true, | ||
)); | ||
|
@@ -42,7 +44,7 @@ protected function setUp() | |
} | ||
|
||
/** | ||
* @dataProvider testExtractDataProvider | ||
* @dataProvider extractDataProvider | ||
*/ | ||
public function testExtract(array $templates, array $parameters, array $messages) | ||
{ | ||
|
@@ -67,13 +69,13 @@ public function testExtract(array $templates, array $parameters, array $messages | |
} | ||
} | ||
|
||
public function testExtractDataProvider() | ||
public function extractDataProvider() | ||
{ | ||
return array( | ||
array( | ||
array( | ||
__DIR__.'/Fixtures/twig/singular.twig', | ||
__DIR__.'/Fixtures/twig/plural.twig', | ||
'/singular.twig', | ||
'/plural.twig', | ||
), | ||
$this->getGettextParameters(), | ||
array( | ||
|
@@ -90,7 +92,7 @@ public function testExtractNoTranslations() | |
{ | ||
$extractor = new Extractor($this->twig); | ||
|
||
$extractor->addTemplate(__DIR__.'/Fixtures/twig/empty.twig'); | ||
$extractor->addTemplate('/empty.twig'); | ||
$extractor->setGettextParameters($this->getGettextParameters()); | ||
|
||
$extractor->extract(); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters