8000 Fix tests by ro0NL · Pull Request #31685 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

Fix tests #31685

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 29, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix tests
  • Loading branch information
ro0NL committed May 29, 2019
commit 733f0179049b9ef1f6de43a647f0d672be9901cb
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,17 @@ public function testIntlTimeZoneInput()
*/
public function testIntlTimeZoneInputWithBc()
{
$reflector = new \ReflectionExtension('intl');
ob_start();
$reflector->info();
$output = strip_tags(ob_get_clean());
preg_match('/^ICU TZData version (?:=>)?(.*)$/m', $output, $matches);
$tzDbVersion = isset($matches[1]) ? (int) trim($matches[1]) : 0;

if (!$tzDbVersion || 2017 <= $tzDbVersion) {
$this->markTestSkipped('"Europe/Saratov" is expired until 2017, current version is '.$tzDbVersion);
}

$form = $this->factory->create(static::TESTED_TYPE, null, ['input' => 'intltimezone']);
$form->submit('Europe/Saratov');

Expand All @@ -134,6 +145,17 @@ public function testIntlTimeZoneInputWithBc()
*/
public function testIntlTimeZoneInputWithBcAndIntl()
{
$reflector = new \ReflectionExtension('intl');
ob_start();
$reflector->info();
$output = strip_tags(ob_get_clean());
preg_match('/^ICU TZData version (?:=>)?(.*)$/m', $output, $matches);
$tzDbVersion = isset($matches[1]) ? (int) trim($matches[1]) : 0;

if (!$tzDbVersion || 2017 <= $tzDbVersion) {
$this->markTestSkipped('"Europe/Saratov" is expired until 2017, current version is '.$tzDbVersion);
}

$form = $this->factory->create(static::TESTED_TYPE, null, ['input' => 'intltimezone', 'intl' => true]);
$form->submit('Europe/Saratov');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public function getValidTimezones(): iterable
yield ['PST8PDT'];
yield ['America/Montreal'];

// expired in ICU
// previously expired in ICU
yield ['Europe/Saratov'];

// standard
Expand Down Expand Up @@ -316,6 +316,17 @@ public function getDeprecatedTimezones(): iterable
*/
public function testIntlCompatibility()
{
$reflector = new \ReflectionExtension('intl');
ob_start();
$reflector->info();
$output = strip_tags(ob_get_clean());
preg_match('/^ICU TZData version (?:=>)?(.*)$/m', $output, $matches);
$tzDbVersion = isset($matches[1]) ? (int) trim($matches[1]) : 0;

if (!$tzDbVersion || 2017 <= $tzDbVersion) {
$this->markTestSkipped('"Europe/Saratov" is expired until 2017, current version is '.$tzDbVersion);
}

$constraint = new Timezone([
'message' => 'myMessage',
'intlCompatible' => true,
Expand Down
0