mirror of
https://github.com/twigphp/Twig.git
synced 2026-08-31 12:37:15 +00:00
Add test about version
This commit is contained in:
@@ -38,6 +38,21 @@ class EnvironmentTest extends TestCase
|
||||
{
|
||||
use ExpectDeprecationTrait;
|
||||
|
||||
public function testVersionConstants()
|
||||
{
|
||||
$version = Environment::VERSION;
|
||||
$exploded = explode('-', $version);
|
||||
$this->assertEquals(Environment::EXTRA_VERSION, $exploded[1] ?? '');
|
||||
|
||||
$version = $exploded[0];
|
||||
$exploded = explode('.', $version);
|
||||
$this->assertEquals(Environment::MAJOR_VERSION, $exploded[0]);
|
||||
$this->assertEquals(Environment::MINOR_VERSION, $exploded[1]);
|
||||
$this->assertEquals(Environment::RELEASE_VERSION, $exploded[2]);
|
||||
|
||||
$this->assertEquals(Environment::VERSION_ID, \sprintf('%s0%s0%s', $exploded[0], $exploded[1], $exploded[2]));
|
||||
}
|
||||
|
||||
public function testAutoescapeOption()
|
||||
{
|
||||
$loader = new ArrayLoader([
|
||||
|
||||
Reference in New Issue
Block a user