1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
|
<?php
declare(strict_types=1);
/**
* @author giggsey
* @package Locale
*/
namespace Giggsey\Locale\Tests;
use Giggsey\Locale\Locale;
use PHPUnit\Framework\TestCase;
class VersionTest extends TestCase
{
public function testGetVersion(): void
{
$version = null;
$currentVersionContents = file(__DIR__ . '/../CLDR-VERSION.txt');
foreach ($currentVersionContents as $line) {
if (trim($line) !== '' && !str_starts_with($line, '#')) {
$version = trim($line);
break;
}
}
$this->assertNotNull($version);
$this->assertSame($version, Locale::getVersion());
}
}
|