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

Commit

Permalink
Merge remote-tracking branch 'weierophinney/feature/registry-remove-s…
Browse files Browse the repository at this point in the history
…ingleton'
  • Loading branch information
akrabat committed Jun 28, 2012
11 parents 046d669 + ab7d56c + 6dbeef6 + 84670b1 + cccfba9 + 2717653 + b4dd364 + 460818e + 436e613 + 2d218aa + f2e7f45 commit b5ac15d
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 67 deletions.
3 changes: 1 addition & 2 deletions src/Alnum.php
Expand Up @@ -22,8 +22,7 @@

use Traversable;
use Zend\Stdlib\ArrayUtils;
use Zend\Locale\Locale as ZendLocale,
Zend\Registry;
use Zend\Locale\Locale as ZendLocale;

/**
* @category Zend
Expand Down
1 change: 0 additions & 1 deletion src/Alpha.php
Expand Up @@ -22,7 +22,6 @@

use Traversable,
Zend\Locale\Locale as ZendLocale,
Zend\Registry,
Zend\Stdlib\ArrayUtils;

/**
Expand Down
33 changes: 1 addition & 32 deletions test/AlnumTest.php
Expand Up @@ -22,8 +22,7 @@
namespace ZendTest\Filter;

use Zend\Filter\Alnum as AlnumFilter,
Zend\Locale\Locale as ZendLocale,
Zend\Registry;
Zend\Locale\Locale as ZendLocale;

/**
* @category Zend
Expand Down Expand Up @@ -183,34 +182,4 @@ public function testAllowWhiteSpace()
);
}
}

/**
* @group ZF-11631
*/
public function testRegistryLocale()
{
$locale = new ZendLocale('ja');
\Zend\Registry::set('Zend_Locale', $locale);

if (!self::$_unicodeEnabled) {
$this->markTestSkipped('Unicode not enabled');
}

$valuesExpected = array(
'aABb3456' => 'aB35',
'z7 Y8 x9' => 'z8x',
',s1.2r3#:q,' => 's12rq',
);

$filter = new AlnumFilter();
$this->assertEquals('ja', (string) $filter->getLocale());

foreach ($valuesExpected as $input => $output) {
$this->assertEquals(
$output,
$result = $filter($input),
"Expected '$input' to filter to '$output', but received '$result' instead"
);
}
}
}
32 changes: 0 additions & 32 deletions test/AlphaTest.php
Expand Up @@ -190,36 +190,4 @@ public function testAllowWhiteSpace()
);
}
}

/**
* @group ZF-11631
*/
public function testRegistryLocale()
{
$locale = new Locale('ja');
\Zend\Registry::set('Zend_Locale', $locale);

if (!self::$_unicodeEnabled) {
$this->markTestSkipped('Unicode not enabled');
}

$valuesExpected = array(
'aABbc' => 'aBc',
'z Y x' => 'zx',
'W1v3U4t' => 'vt',
',sй.rλ:qν_p' => 'srqp',
'onml' => 'onml'
);

$filter = new AlphaFilter();
$this->assertEquals('ja', (string) $filter->getLocale());

foreach ($valuesExpected as $input => $output) {
$this->assertEquals(
$output,
$result = $filter($input),
"Expected '$input' to filter to '$output', but received '$result' instead"
);
}
}
}

0 comments on commit b5ac15d

Please sign in to comment.