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

Commit

Permalink
Merge branch 'hotfix/5111' into develop
Browse files Browse the repository at this point in the history
Forward port zendframework/zendframework#5111

Conflicts:
	tests/ZendTest/I18n/Translator/Loader/GettextTest.php
	tests/ZendTest/I18n/Translator/Loader/PhpArrayTest.php
  • Loading branch information
weierophinney committed Oct 22, 2013
150 parents ccac36b + d1facdb + 1b49389 + d7193b9 + 3fed016 + 082acdb + 3ddc8fa + 274bd7f + c9e433d + 99f6515 + 8d1a271 + 2c2bc35 + 16359e3 + 10b9b3c + d05ac01 + 9628c66 + 66c8763 + 943d333 + 8342f70 + 4eb4184 + 4ea0bc2 + 860b725 + 7d29287 + 49a7844 + 3836aa0 + de1fe83 + 929eb12 + 6e6902f + f823467 + f3b3f76 + 93aff47 + 5f2adec + 7674ec8 + 2200ed2 + f033c86 + d43a2da + 4434323 + 88b21e1 + b02b602 + b692de7 + 7f833d2 + 2eaf4da + a7848de + 5bd9f85 + d7a26e8 + 173f53d + bd77e8e + 45f017e + 118612c + 3a09f79 + 47d92bc + dbf56ad + a753b61 + 6467186 + 5ac4124 + 2bf68ca + e7cd709 + 7a552db + f112e0c + cec42fc + 066eb37 + 3569d8b + 00def10 + ecae47b + 0e552a5 + 4f854c2 + 2b17650 + c1c0447 + 73b1f80 + dd4a335 + a40eb42 + 9262db1 + bdbd950 + 6d50117 + 10b08a7 + f692a0d + ebe63d3 + 528260b + 5f04a7f + c0dcd12 + 224f280 + 8785f25 + 866539b + d711927 + e280213 + 002f0d4 + 5ffcbbe + 8937705 + 5803840 + 3d7cd9a + 6b14f0e + 24bd169 + 0eba870 + 4e4acfe + 9e243bd + e156354 + 2a84563 + 3f1f758 + 4e425f4 + 7030f97 + ea08a0f + 213ebd9 + 5d80740 + 800c29c + be31ff1 + 8f989d6 + 8b02a8b + 4cfd82c + c411f06 + 4229561 + b321e3b + 2e660f9 + 3fff65f + a2eb7bf + 82469ff + 22fa741 + 99819cb + 8c16404 + a7c0820 + 7d277af + da0bec5 + 33f214a + a07f208 + 963d2fe + 1100f88 + 6713bf5 + 7421758 + b64a638 + 772a2a1 + dff3231 + 56bc4ca + 463e3d7 + 14bd316 + f8b9e58 + ef0268c + 3fe91ce + 130da19 + 6d4097d + 02fa5b3 + 927b7df + 2fbc2a0 + c772270 + 1cdc0cc + ecb5260 + 23824d1 + 56e8233 + 3c0e07f + 8fb917d + 575c951 + fc97106 commit 997a8a7
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/AbstractTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ public function testGlobalDefaultTranslatorNullByDefault()

public function testErrorMessagesAreTranslatedWhenTranslatorPresent()
{
if (!extension_loaded('intl')) {
$this->markTestSkipped('ext/intl not enabled');
}

$loader = new TestAsset\ArrayTranslator();
$loader->translations = array(
'fooMessage' => 'This is the translated message for %value%',
Expand All @@ -88,6 +92,10 @@ public function testErrorMessagesAreTranslatedWhenTranslatorPresent()

public function testCanTranslateMessagesInsteadOfKeys()
{
if (!extension_loaded('intl')) {
$this->markTestSkipped('ext/intl not enabled');
}

$loader = new TestAsset\ArrayTranslator();
$loader->translations = array(
'%value% was passed' => 'This is the translated message for %value%',
Expand Down Expand Up @@ -149,6 +157,10 @@ public function testTranslatorEnabledPerDefault()

public function testCanDisableTranslator()
{
if (!extension_loaded('intl')) {
$this->markTestSkipped('ext/intl not enabled');
}

$loader = new TestAsset\ArrayTranslator();
$loader->translations = array(
'%value% was passed' => 'This is the translated message for %value%',
Expand Down
4 changes: 4 additions & 0 deletions test/EmailAddressTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,10 @@ public function testGetMessages()
*/
public function testHostnameValidatorMessagesShouldBeTranslated()
{
if (!extension_loaded('intl')) {
$this->markTestSkipped('ext/intl not enabled');
}

$hostnameValidator = new Hostname();
$translations = array(
'hostnameIpAddressNotAllowed' => 'hostnameIpAddressNotAllowed translation',
Expand Down
4 changes: 4 additions & 0 deletions test/HostnameTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,10 @@ public function testGetAllow()
*/
public function testValidatorMessagesShouldBeTranslated()
{
if (!extension_loaded('intl')) {
$this->markTestSkipped('ext/intl not enabled');
}

$translations = array(
'hostnameInvalidLocalName' => 'this is the IP error message',
);
Expand Down
4 changes: 4 additions & 0 deletions test/StaticValidatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ public function testLocalTranslatorPreferredOverGlobalTranslator()

public function testMaximumErrorMessageLength()
{
if (!extension_loaded('intl')) {
$this->markTestSkipped('ext/intl not enabled');
}

$this->assertEquals(-1, AbstractValidator::getMessageLength());
AbstractValidator::setMessageLength(10);
$this->assertEquals(10, AbstractValidator::getMessageLength());
Expand Down

0 comments on commit 997a8a7

Please sign in to comment.