Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

Commit

Permalink
[#5942] skip some tests when ext/intl is not present
Browse files Browse the repository at this point in the history
- When @ralphschindler ran using a PHP version that did not have
  ext/intl, these two tests failed. They should not run in that
  situation.
  • Loading branch information
weierophinney committed Mar 11, 2014
1 parent 4482fa0 commit a370817
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/ZendTest/Mvc/Service/TranslatorServiceFactoryTest.php
Expand Up @@ -44,13 +44,21 @@ public function testReturnsMvcTranslatorWithDummyTranslatorComposedWhenExtIntlIs

public function testReturnsMvcTranslatorWithI18nTranslatorComposedWhenNoTranslatorInterfaceOrConfigServicesPresent()
{
if (!extension_loaded('intl')) {
$this->markTestSkipped('This test will only run if ext/intl is present');
}

$translator = $this->factory->createService($this->services);
$this->assertInstanceOf('Zend\Mvc\I18n\Translator', $translator);
$this->assertInstanceOf('Zend\I18n\Translator\Translator', $translator->getTranslator());
}

public function testReturnsTranslatorBasedOnConfigurationWhenNoTranslatorInterfaceServicePresent()
{
if (!extension_loaded('intl')) {
$this->markTestSkipped('This test will only run if ext/intl is present');
}

$config = array('translator' => array(
'locale' => 'en_US',
));
Expand Down

0 comments on commit a370817

Please sign in to comment.