remove private in favor of protected visibility

This commit is contained in:
euromark 2013-07-22 21:08:05 +02:00
parent 2d2721d2d9
commit 24fa926ff9

View file

@ -108,10 +108,10 @@ class I18nTest extends CakeTestCase {
* @return void * @return void
*/ */
public function testDefaultStrings() { public function testDefaultStrings() {
$singular = $this->__singular(); $singular = $this->_singular();
$this->assertEquals('Plural Rule 1', $singular); $this->assertEquals('Plural Rule 1', $singular);
$plurals = $this->__plural(); $plurals = $this->_plural();
$this->assertTrue(in_array('0 = 0 or > 1', $plurals)); $this->assertTrue(in_array('0 = 0 or > 1', $plurals));
$this->assertTrue(in_array('1 = 1', $plurals)); $this->assertTrue(in_array('1 = 1', $plurals));
$this->assertTrue(in_array('2 = 0 or > 1', $plurals)); $this->assertTrue(in_array('2 = 0 or > 1', $plurals));
@ -139,10 +139,10 @@ class I18nTest extends CakeTestCase {
$this->assertTrue(in_array('24 = 0 or > 1', $plurals)); $this->assertTrue(in_array('24 = 0 or > 1', $plurals));
$this->assertTrue(in_array('25 = 0 or > 1', $plurals)); $this->assertTrue(in_array('25 = 0 or > 1', $plurals));
$coreSingular = $this->__singularFromCore(); $coreSingular = $this->_singularFromCore();
$this->assertEquals('Plural Rule 1 (from core)', $coreSingular); $this->assertEquals('Plural Rule 1 (from core)', $coreSingular);
$corePlurals = $this->__pluralFromCore(); $corePlurals = $this->_pluralFromCore();
$this->assertTrue(in_array('0 = 0 or > 1 (from core)', $corePlurals)); $this->assertTrue(in_array('0 = 0 or > 1 (from core)', $corePlurals));
$this->assertTrue(in_array('1 = 1 (from core)', $corePlurals)); $this->assertTrue(in_array('1 = 1 (from core)', $corePlurals));
$this->assertTrue(in_array('2 = 0 or > 1 (from core)', $corePlurals)); $this->assertTrue(in_array('2 = 0 or > 1 (from core)', $corePlurals));
@ -197,10 +197,10 @@ class I18nTest extends CakeTestCase {
* @return void * @return void
*/ */
public function assertRulesZero() { public function assertRulesZero() {
$singular = $this->__singular(); $singular = $this->_singular();
$this->assertEquals('Plural Rule 0 (translated)', $singular); $this->assertEquals('Plural Rule 0 (translated)', $singular);
$plurals = $this->__plural(); $plurals = $this->_plural();
$this->assertTrue(in_array('0 ends with any # (translated)', $plurals)); $this->assertTrue(in_array('0 ends with any # (translated)', $plurals));
$this->assertTrue(in_array('1 ends with any # (translated)', $plurals)); $this->assertTrue(in_array('1 ends with any # (translated)', $plurals));
$this->assertTrue(in_array('2 ends with any # (translated)', $plurals)); $this->assertTrue(in_array('2 ends with any # (translated)', $plurals));
@ -228,10 +228,10 @@ class I18nTest extends CakeTestCase {
$this->assertTrue(in_array('24 ends with any # (translated)', $plurals)); $this->assertTrue(in_array('24 ends with any # (translated)', $plurals));
$this->assertTrue(in_array('25 ends with any # (translated)', $plurals)); $this->assertTrue(in_array('25 ends with any # (translated)', $plurals));
$coreSingular = $this->__singularFromCore(); $coreSingular = $this->_singularFromCore();
$this->assertEquals('Plural Rule 0 (from core translated)', $coreSingular); $this->assertEquals('Plural Rule 0 (from core translated)', $coreSingular);
$corePlurals = $this->__pluralFromCore(); $corePlurals = $this->_pluralFromCore();
$this->assertTrue(in_array('0 ends with any # (from core translated)', $corePlurals)); $this->assertTrue(in_array('0 ends with any # (from core translated)', $corePlurals));
$this->assertTrue(in_array('1 ends with any # (from core translated)', $corePlurals)); $this->assertTrue(in_array('1 ends with any # (from core translated)', $corePlurals));
$this->assertTrue(in_array('2 ends with any # (from core translated)', $corePlurals)); $this->assertTrue(in_array('2 ends with any # (from core translated)', $corePlurals));
@ -286,10 +286,10 @@ class I18nTest extends CakeTestCase {
* @return void * @return void
*/ */
public function assertRulesOne() { public function assertRulesOne() {
$singular = $this->__singular(); $singular = $this->_singular();
$this->assertEquals('Plural Rule 1 (translated)', $singular); $this->assertEquals('Plural Rule 1 (translated)', $singular);
$plurals = $this->__plural(); $plurals = $this->_plural();
$this->assertTrue(in_array('0 = 0 or > 1 (translated)', $plurals)); $this->assertTrue(in_array('0 = 0 or > 1 (translated)', $plurals));
$this->assertTrue(in_array('1 = 1 (translated)', $plurals)); $this->assertTrue(in_array('1 = 1 (translated)', $plurals));
$this->assertTrue(in_array('2 = 0 or > 1 (translated)', $plurals)); $this->assertTrue(in_array('2 = 0 or > 1 (translated)', $plurals));
@ -317,10 +317,10 @@ class I18nTest extends CakeTestCase {
$this->assertTrue(in_array('24 = 0 or > 1 (translated)', $plurals)); $this->assertTrue(in_array('24 = 0 or > 1 (translated)', $plurals));
$this->assertTrue(in_array('25 = 0 or > 1 (translated)', $plurals)); $this->assertTrue(in_array('25 = 0 or > 1 (translated)', $plurals));
$coreSingular = $this->__singularFromCore(); $coreSingular = $this->_singularFromCore();
$this->assertEquals('Plural Rule 1 (from core translated)', $coreSingular); $this->assertEquals('Plural Rule 1 (from core translated)', $coreSingular);
$corePlurals = $this->__pluralFromCore(); $corePlurals = $this->_pluralFromCore();
$this->assertTrue(in_array('0 = 0 or > 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('0 = 0 or > 1 (from core translated)', $corePlurals));
$this->assertTrue(in_array('1 = 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('1 = 1 (from core translated)', $corePlurals));
$this->assertTrue(in_array('2 = 0 or > 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('2 = 0 or > 1 (from core translated)', $corePlurals));
@ -375,10 +375,10 @@ class I18nTest extends CakeTestCase {
* @return void * @return void
*/ */
public function assertRulesTwo() { public function assertRulesTwo() {
$singular = $this->__singular(); $singular = $this->_singular();
$this->assertEquals('Plural Rule 2 (translated)', $singular); $this->assertEquals('Plural Rule 2 (translated)', $singular);
$plurals = $this->__plural(); $plurals = $this->_plural();
$this->assertTrue(in_array('0 = 0 or 1 (translated)', $plurals)); $this->assertTrue(in_array('0 = 0 or 1 (translated)', $plurals));
$this->assertTrue(in_array('1 = 0 or 1 (translated)', $plurals)); $this->assertTrue(in_array('1 = 0 or 1 (translated)', $plurals));
$this->assertTrue(in_array('2 > 1 (translated)', $plurals)); $this->assertTrue(in_array('2 > 1 (translated)', $plurals));
@ -406,10 +406,10 @@ class I18nTest extends CakeTestCase {
$this->assertTrue(in_array('24 > 1 (translated)', $plurals)); $this->assertTrue(in_array('24 > 1 (translated)', $plurals));
$this->assertTrue(in_array('25 > 1 (translated)', $plurals)); $this->assertTrue(in_array('25 > 1 (translated)', $plurals));
$coreSingular = $this->__singularFromCore(); $coreSingular = $this->_singularFromCore();
$this->assertEquals('Plural Rule 2 (from core translated)', $coreSingular); $this->assertEquals('Plural Rule 2 (from core translated)', $coreSingular);
$corePlurals = $this->__pluralFromCore(); $corePlurals = $this->_pluralFromCore();
$this->assertTrue(in_array('0 = 0 or 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('0 = 0 or 1 (from core translated)', $corePlurals));
$this->assertTrue(in_array('1 = 0 or 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('1 = 0 or 1 (from core translated)', $corePlurals));
$this->assertTrue(in_array('2 > 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('2 > 1 (from core translated)', $corePlurals));
@ -464,10 +464,10 @@ class I18nTest extends CakeTestCase {
* @return void * @return void
*/ */
public function assertRulesThree() { public function assertRulesThree() {
$singular = $this->__singular(); $singular = $this->_singular();
$this->assertEquals('Plural Rule 3 (translated)', $singular); $this->assertEquals('Plural Rule 3 (translated)', $singular);
$plurals = $this->__plural(); $plurals = $this->_plural();
$this->assertTrue(in_array('0 = 0 (translated)', $plurals)); $this->assertTrue(in_array('0 = 0 (translated)', $plurals));
$this->assertTrue(in_array('1 ends 1 but not 11 (translated)', $plurals)); $this->assertTrue(in_array('1 ends 1 but not 11 (translated)', $plurals));
$this->assertTrue(in_array('2 everything else (translated)', $plurals)); $this->assertTrue(in_array('2 everything else (translated)', $plurals));
@ -495,10 +495,10 @@ class I18nTest extends CakeTestCase {
$this->assertTrue(in_array('24 everything else (translated)', $plurals)); $this->assertTrue(in_array('24 everything else (translated)', $plurals));
$this->assertTrue(in_array('25 everything else (translated)', $plurals)); $this->assertTrue(in_array('25 everything else (translated)', $plurals));
$coreSingular = $this->__singularFromCore(); $coreSingular = $this->_singularFromCore();
$this->assertEquals('Plural Rule 3 (from core translated)', $coreSingular); $this->assertEquals('Plural Rule 3 (from core translated)', $coreSingular);
$corePlurals = $this->__pluralFromCore(); $corePlurals = $this->_pluralFromCore();
$this->assertTrue(in_array('0 = 0 (from core translated)', $corePlurals)); $this->assertTrue(in_array('0 = 0 (from core translated)', $corePlurals));
$this->assertTrue(in_array('1 ends 1 but not 11 (from core translated)', $corePlurals)); $this->assertTrue(in_array('1 ends 1 but not 11 (from core translated)', $corePlurals));
$this->assertTrue(in_array('2 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('2 everything else (from core translated)', $corePlurals));
@ -553,10 +553,10 @@ class I18nTest extends CakeTestCase {
* @return void * @return void
*/ */
public function assertRulesFour() { public function assertRulesFour() {
$singular = $this->__singular(); $singular = $this->_singular();
$this->assertEquals('Plural Rule 4 (translated)', $singular); $this->assertEquals('Plural Rule 4 (translated)', $singular);
$plurals = $this->__plural(); $plurals = $this->_plural();
$this->assertTrue(in_array('0 everything else (translated)', $plurals)); $this->assertTrue(in_array('0 everything else (translated)', $plurals));
$this->assertTrue(in_array('1 = 1 (translated)', $plurals)); $this->assertTrue(in_array('1 = 1 (translated)', $plurals));
$this->assertTrue(in_array('2 = 2 (translated)', $plurals)); $this->assertTrue(in_array('2 = 2 (translated)', $plurals));
@ -584,10 +584,10 @@ class I18nTest extends CakeTestCase {
$this->assertTrue(in_array('24 everything else (translated)', $plurals)); $this->assertTrue(in_array('24 everything else (translated)', $plurals));
$this->assertTrue(in_array('25 everything else (translated)', $plurals)); $this->assertTrue(in_array('25 everything else (translated)', $plurals));
$coreSingular = $this->__singularFromCore(); $coreSingular = $this->_singularFromCore();
$this->assertEquals('Plural Rule 4 (from core translated)', $coreSingular); $this->assertEquals('Plural Rule 4 (from core translated)', $coreSingular);
$corePlurals = $this->__pluralFromCore(); $corePlurals = $this->_pluralFromCore();
$this->assertTrue(in_array('0 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('0 everything else (from core translated)', $corePlurals));
$this->assertTrue(in_array('1 = 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('1 = 1 (from core translated)', $corePlurals));
$this->assertTrue(in_array('2 = 2 (from core translated)', $corePlurals)); $this->assertTrue(in_array('2 = 2 (from core translated)', $corePlurals));
@ -642,10 +642,10 @@ class I18nTest extends CakeTestCase {
* @return void * @return void
*/ */
public function assertRulesFive() { public function assertRulesFive() {
$singular = $this->__singular(); $singular = $this->_singular();
$this->assertEquals('Plural Rule 5 (translated)', $singular); $this->assertEquals('Plural Rule 5 (translated)', $singular);
$plurals = $this->__plural(); $plurals = $this->_plural();
$this->assertTrue(in_array('0 = 0 or ends in 01-19 (translated)', $plurals)); $this->assertTrue(in_array('0 = 0 or ends in 01-19 (translated)', $plurals));
$this->assertTrue(in_array('0 = 0 or ends in 01-19 (translated)', $plurals)); $this->assertTrue(in_array('0 = 0 or ends in 01-19 (translated)', $plurals));
$this->assertTrue(in_array('1 = 1 (translated)', $plurals)); $this->assertTrue(in_array('1 = 1 (translated)', $plurals));
@ -674,10 +674,10 @@ class I18nTest extends CakeTestCase {
$this->assertTrue(in_array('24 everything else (translated)', $plurals)); $this->assertTrue(in_array('24 everything else (translated)', $plurals));
$this->assertTrue(in_array('25 everything else (translated)', $plurals)); $this->assertTrue(in_array('25 everything else (translated)', $plurals));
$coreSingular = $this->__singularFromCore(); $coreSingular = $this->_singularFromCore();
$this->assertEquals('Plural Rule 5 (from core translated)', $coreSingular); $this->assertEquals('Plural Rule 5 (from core translated)', $coreSingular);
$corePlurals = $this->__pluralFromCore(); $corePlurals = $this->_pluralFromCore();
$this->assertTrue(in_array('0 = 0 or ends in 01-19 (from core translated)', $corePlurals)); $this->assertTrue(in_array('0 = 0 or ends in 01-19 (from core translated)', $corePlurals));
$this->assertTrue(in_array('0 = 0 or ends in 01-19 (from core translated)', $corePlurals)); $this->assertTrue(in_array('0 = 0 or ends in 01-19 (from core translated)', $corePlurals));
$this->assertTrue(in_array('1 = 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('1 = 1 (from core translated)', $corePlurals));
@ -733,10 +733,10 @@ class I18nTest extends CakeTestCase {
* @return void * @return void
*/ */
public function assertRulesSix() { public function assertRulesSix() {
$singular = $this->__singular(); $singular = $this->_singular();
$this->assertEquals('Plural Rule 6 (translated)', $singular); $this->assertEquals('Plural Rule 6 (translated)', $singular);
$plurals = $this->__plural(); $plurals = $this->_plural();
$this->assertTrue(in_array('0 ends in 0 or ends in 10-20 (translated)', $plurals)); $this->assertTrue(in_array('0 ends in 0 or ends in 10-20 (translated)', $plurals));
$this->assertTrue(in_array('1 ends in 1, not 11 (translated)', $plurals)); $this->assertTrue(in_array('1 ends in 1, not 11 (translated)', $plurals));
$this->assertTrue(in_array('2 everything else (translated)', $plurals)); $this->assertTrue(in_array('2 everything else (translated)', $plurals));
@ -764,10 +764,10 @@ class I18nTest extends CakeTestCase {
$this->assertTrue(in_array('24 everything else (translated)', $plurals)); $this->assertTrue(in_array('24 everything else (translated)', $plurals));
$this->assertTrue(in_array('25 everything else (translated)', $plurals)); $this->assertTrue(in_array('25 everything else (translated)', $plurals));
$coreSingular = $this->__singularFromCore(); $coreSingular = $this->_singularFromCore();
$this->assertEquals('Plural Rule 6 (from core translated)', $coreSingular); $this->assertEquals('Plural Rule 6 (from core translated)', $coreSingular);
$corePlurals = $this->__pluralFromCore(); $corePlurals = $this->_pluralFromCore();
$this->assertTrue(in_array('0 ends in 0 or ends in 10-20 (from core translated)', $corePlurals)); $this->assertTrue(in_array('0 ends in 0 or ends in 10-20 (from core translated)', $corePlurals));
$this->assertTrue(in_array('1 ends in 1, not 11 (from core translated)', $corePlurals)); $this->assertTrue(in_array('1 ends in 1, not 11 (from core translated)', $corePlurals));
$this->assertTrue(in_array('2 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('2 everything else (from core translated)', $corePlurals));
@ -822,10 +822,10 @@ class I18nTest extends CakeTestCase {
* @return void * @return void
*/ */
public function assertRulesSeven() { public function assertRulesSeven() {
$singular = $this->__singular(); $singular = $this->_singular();
$this->assertEquals('Plural Rule 7 (translated)', $singular); $this->assertEquals('Plural Rule 7 (translated)', $singular);
$plurals = $this->__plural(); $plurals = $this->_plural();
$this->assertTrue(in_array('0 everything else (translated)', $plurals)); $this->assertTrue(in_array('0 everything else (translated)', $plurals));
$this->assertTrue(in_array('1 ends in 1, not 11 (translated)', $plurals)); $this->assertTrue(in_array('1 ends in 1, not 11 (translated)', $plurals));
$this->assertTrue(in_array('2 ends in 2-4, not 12-14 (translated)', $plurals)); $this->assertTrue(in_array('2 ends in 2-4, not 12-14 (translated)', $plurals));
@ -853,10 +853,10 @@ class I18nTest extends CakeTestCase {
$this->assertTrue(in_array('24 ends in 2-4, not 12-14 (translated)', $plurals)); $this->assertTrue(in_array('24 ends in 2-4, not 12-14 (translated)', $plurals));
$this->assertTrue(in_array('25 everything else (translated)', $plurals)); $this->assertTrue(in_array('25 everything else (translated)', $plurals));
$coreSingular = $this->__singularFromCore(); $coreSingular = $this->_singularFromCore();
$this->assertEquals('Plural Rule 7 (from core translated)', $coreSingular); $this->assertEquals('Plural Rule 7 (from core translated)', $coreSingular);
$corePlurals = $this->__pluralFromCore(); $corePlurals = $this->_pluralFromCore();
$this->assertTrue(in_array('0 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('0 everything else (from core translated)', $corePlurals));
$this->assertTrue(in_array('1 ends in 1, not 11 (from core translated)', $corePlurals)); $this->assertTrue(in_array('1 ends in 1, not 11 (from core translated)', $corePlurals));
$this->assertTrue(in_array('2 ends in 2-4, not 12-14 (from core translated)', $corePlurals)); $this->assertTrue(in_array('2 ends in 2-4, not 12-14 (from core translated)', $corePlurals));
@ -911,10 +911,10 @@ class I18nTest extends CakeTestCase {
* @return void * @return void
*/ */
public function assertRulesEight() { public function assertRulesEight() {
$singular = $this->__singular(); $singular = $this->_singular();
$this->assertEquals('Plural Rule 8 (translated)', $singular); $this->assertEquals('Plural Rule 8 (translated)', $singular);
$plurals = $this->__plural(); $plurals = $this->_plural();
$this->assertTrue(in_array('0 everything else (translated)', $plurals)); $this->assertTrue(in_array('0 everything else (translated)', $plurals));
$this->assertTrue(in_array('1 is 1 (translated)', $plurals)); $this->assertTrue(in_array('1 is 1 (translated)', $plurals));
$this->assertTrue(in_array('2 is 2-4 (translated)', $plurals)); $this->assertTrue(in_array('2 is 2-4 (translated)', $plurals));
@ -942,10 +942,10 @@ class I18nTest extends CakeTestCase {
$this->assertTrue(in_array('24 everything else (translated)', $plurals)); $this->assertTrue(in_array('24 everything else (translated)', $plurals));
$this->assertTrue(in_array('25 everything else (translated)', $plurals)); $this->assertTrue(in_array('25 everything else (translated)', $plurals));
$coreSingular = $this->__singularFromCore(); $coreSingular = $this->_singularFromCore();
$this->assertEquals('Plural Rule 8 (from core translated)', $coreSingular); $this->assertEquals('Plural Rule 8 (from core translated)', $coreSingular);
$corePlurals = $this->__pluralFromCore(); $corePlurals = $this->_pluralFromCore();
$this->assertTrue(in_array('0 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('0 everything else (from core translated)', $corePlurals));
$this->assertTrue(in_array('1 is 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('1 is 1 (from core translated)', $corePlurals));
$this->assertTrue(in_array('2 is 2-4 (from core translated)', $corePlurals)); $this->assertTrue(in_array('2 is 2-4 (from core translated)', $corePlurals));
@ -1000,10 +1000,10 @@ class I18nTest extends CakeTestCase {
* @return void * @return void
*/ */
public function assertRulesNine() { public function assertRulesNine() {
$singular = $this->__singular(); $singular = $this->_singular();
$this->assertEquals('Plural Rule 9 (translated)', $singular); $this->assertEquals('Plural Rule 9 (translated)', $singular);
$plurals = $this->__plural(); $plurals = $this->_plural();
$this->assertTrue(in_array('0 everything else (translated)', $plurals)); $this->assertTrue(in_array('0 everything else (translated)', $plurals));
$this->assertTrue(in_array('0 everything else (translated)', $plurals)); $this->assertTrue(in_array('0 everything else (translated)', $plurals));
$this->assertTrue(in_array('1 is 1 (translated)', $plurals)); $this->assertTrue(in_array('1 is 1 (translated)', $plurals));
@ -1032,10 +1032,10 @@ class I18nTest extends CakeTestCase {
$this->assertTrue(in_array('24 ends in 2-4, not 12-14 (translated)', $plurals)); $this->assertTrue(in_array('24 ends in 2-4, not 12-14 (translated)', $plurals));
$this->assertTrue(in_array('25 everything else (translated)', $plurals)); $this->assertTrue(in_array('25 everything else (translated)', $plurals));
$coreSingular = $this->__singularFromCore(); $coreSingular = $this->_singularFromCore();
$this->assertEquals('Plural Rule 9 (from core translated)', $coreSingular); $this->assertEquals('Plural Rule 9 (from core translated)', $coreSingular);
$corePlurals = $this->__pluralFromCore(); $corePlurals = $this->_pluralFromCore();
$this->assertTrue(in_array('0 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('0 everything else (from core translated)', $corePlurals));
$this->assertTrue(in_array('0 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('0 everything else (from core translated)', $corePlurals));
$this->assertTrue(in_array('0 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('0 everything else (from core translated)', $corePlurals));
@ -1092,10 +1092,10 @@ class I18nTest extends CakeTestCase {
* @return void * @return void
*/ */
public function assertRulesTen() { public function assertRulesTen() {
$singular = $this->__singular(); $singular = $this->_singular();
$this->assertEquals('Plural Rule 10 (translated)', $singular); $this->assertEquals('Plural Rule 10 (translated)', $singular);
$plurals = $this->__plural(); $plurals = $this->_plural();
$this->assertTrue(in_array('0 everything else (translated)', $plurals)); $this->assertTrue(in_array('0 everything else (translated)', $plurals));
$this->assertTrue(in_array('0 everything else (translated)', $plurals)); $this->assertTrue(in_array('0 everything else (translated)', $plurals));
$this->assertTrue(in_array('1 ends in 1 (translated)', $plurals)); $this->assertTrue(in_array('1 ends in 1 (translated)', $plurals));
@ -1124,10 +1124,10 @@ class I18nTest extends CakeTestCase {
$this->assertTrue(in_array('24 everything else (translated)', $plurals)); $this->assertTrue(in_array('24 everything else (translated)', $plurals));
$this->assertTrue(in_array('25 everything else (translated)', $plurals)); $this->assertTrue(in_array('25 everything else (translated)', $plurals));
$coreSingular = $this->__singularFromCore(); $coreSingular = $this->_singularFromCore();
$this->assertEquals('Plural Rule 10 (from core translated)', $coreSingular); $this->assertEquals('Plural Rule 10 (from core translated)', $coreSingular);
$corePlurals = $this->__pluralFromCore(); $corePlurals = $this->_pluralFromCore();
$this->assertTrue(in_array('0 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('0 everything else (from core translated)', $corePlurals));
$this->assertTrue(in_array('0 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('0 everything else (from core translated)', $corePlurals));
$this->assertTrue(in_array('1 ends in 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('1 ends in 1 (from core translated)', $corePlurals));
@ -1183,10 +1183,10 @@ class I18nTest extends CakeTestCase {
* @return void * @return void
*/ */
public function assertRulesEleven() { public function assertRulesEleven() {
$singular = $this->__singular(); $singular = $this->_singular();
$this->assertEquals('Plural Rule 11 (translated)', $singular); $this->assertEquals('Plural Rule 11 (translated)', $singular);
$plurals = $this->__plural(); $plurals = $this->_plural();
$this->assertTrue(in_array('0 everything else (translated)', $plurals)); $this->assertTrue(in_array('0 everything else (translated)', $plurals));
$this->assertTrue(in_array('1 is 1 (translated)', $plurals)); $this->assertTrue(in_array('1 is 1 (translated)', $plurals));
$this->assertTrue(in_array('2 is 2 (translated)', $plurals)); $this->assertTrue(in_array('2 is 2 (translated)', $plurals));
@ -1214,10 +1214,10 @@ class I18nTest extends CakeTestCase {
$this->assertTrue(in_array('24 everything else (translated)', $plurals)); $this->assertTrue(in_array('24 everything else (translated)', $plurals));
$this->assertTrue(in_array('25 everything else (translated)', $plurals)); $this->assertTrue(in_array('25 everything else (translated)', $plurals));
$coreSingular = $this->__singularFromCore(); $coreSingular = $this->_singularFromCore();
$this->assertEquals('Plural Rule 11 (from core translated)', $coreSingular); $this->assertEquals('Plural Rule 11 (from core translated)', $coreSingular);
$corePlurals = $this->__pluralFromCore(); $corePlurals = $this->_pluralFromCore();
$this->assertTrue(in_array('0 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('0 everything else (from core translated)', $corePlurals));
$this->assertTrue(in_array('1 is 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('1 is 1 (from core translated)', $corePlurals));
$this->assertTrue(in_array('2 is 2 (from core translated)', $corePlurals)); $this->assertTrue(in_array('2 is 2 (from core translated)', $corePlurals));
@ -1272,10 +1272,10 @@ class I18nTest extends CakeTestCase {
* @return void * @return void
*/ */
public function assertRulesTwelve() { public function assertRulesTwelve() {
$singular = $this->__singular(); $singular = $this->_singular();
$this->assertEquals('Plural Rule 12 (translated)', $singular); $this->assertEquals('Plural Rule 12 (translated)', $singular);
$plurals = $this->__plural(); $plurals = $this->_plural();
$this->assertTrue(in_array('0 is 0 or 3-10 (translated)', $plurals)); $this->assertTrue(in_array('0 is 0 or 3-10 (translated)', $plurals));
$this->assertTrue(in_array('1 is 1 (translated)', $plurals)); $this->assertTrue(in_array('1 is 1 (translated)', $plurals));
$this->assertTrue(in_array('2 is 2 (translated)', $plurals)); $this->assertTrue(in_array('2 is 2 (translated)', $plurals));
@ -1303,10 +1303,10 @@ class I18nTest extends CakeTestCase {
$this->assertTrue(in_array('24 everything else (translated)', $plurals)); $this->assertTrue(in_array('24 everything else (translated)', $plurals));
$this->assertTrue(in_array('25 everything else (translated)', $plurals)); $this->assertTrue(in_array('25 everything else (translated)', $plurals));
$coreSingular = $this->__singularFromCore(); $coreSingular = $this->_singularFromCore();
$this->assertEquals('Plural Rule 12 (from core translated)', $coreSingular); $this->assertEquals('Plural Rule 12 (from core translated)', $coreSingular);
$corePlurals = $this->__pluralFromCore(); $corePlurals = $this->_pluralFromCore();
$this->assertTrue(in_array('0 is 0 or 3-10 (from core translated)', $corePlurals)); $this->assertTrue(in_array('0 is 0 or 3-10 (from core translated)', $corePlurals));
$this->assertTrue(in_array('1 is 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('1 is 1 (from core translated)', $corePlurals));
$this->assertTrue(in_array('2 is 2 (from core translated)', $corePlurals)); $this->assertTrue(in_array('2 is 2 (from core translated)', $corePlurals));
@ -1361,10 +1361,10 @@ class I18nTest extends CakeTestCase {
* @return void * @return void
*/ */
public function assertRulesThirteen() { public function assertRulesThirteen() {
$singular = $this->__singular(); $singular = $this->_singular();
$this->assertEquals('Plural Rule 13 (translated)', $singular); $this->assertEquals('Plural Rule 13 (translated)', $singular);
$plurals = $this->__plural(); $plurals = $this->_plural();
$this->assertTrue(in_array('0 is 0 or ends in 01-10 (translated)', $plurals)); $this->assertTrue(in_array('0 is 0 or ends in 01-10 (translated)', $plurals));
$this->assertTrue(in_array('1 is 1 (translated)', $plurals)); $this->assertTrue(in_array('1 is 1 (translated)', $plurals));
$this->assertTrue(in_array('2 is 0 or ends in 01-10 (translated)', $plurals)); $this->assertTrue(in_array('2 is 0 or ends in 01-10 (translated)', $plurals));
@ -1392,10 +1392,10 @@ class I18nTest extends CakeTestCase {
$this->assertTrue(in_array('24 everything else (translated)', $plurals)); $this->assertTrue(in_array('24 everything else (translated)', $plurals));
$this->assertTrue(in_array('25 everything else (translated)', $plurals)); $this->assertTrue(in_array('25 everything else (translated)', $plurals));
$coreSingular = $this->__singularFromCore(); $coreSingular = $this->_singularFromCore();
$this->assertEquals('Plural Rule 13 (from core translated)', $coreSingular); $this->assertEquals('Plural Rule 13 (from core translated)', $coreSingular);
$corePlurals = $this->__pluralFromCore(); $corePlurals = $this->_pluralFromCore();
$this->assertTrue(in_array('0 is 0 or ends in 01-10 (from core translated)', $corePlurals)); $this->assertTrue(in_array('0 is 0 or ends in 01-10 (from core translated)', $corePlurals));
$this->assertTrue(in_array('1 is 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('1 is 1 (from core translated)', $corePlurals));
$this->assertTrue(in_array('2 is 0 or ends in 01-10 (from core translated)', $corePlurals)); $this->assertTrue(in_array('2 is 0 or ends in 01-10 (from core translated)', $corePlurals));
@ -1450,10 +1450,10 @@ class I18nTest extends CakeTestCase {
* @return void * @return void
*/ */
public function assertRulesFourteen() { public function assertRulesFourteen() {
$singular = $this->__singular(); $singular = $this->_singular();
$this->assertEquals('Plural Rule 14 (translated)', $singular); $this->assertEquals('Plural Rule 14 (translated)', $singular);
$plurals = $this->__plural(); $plurals = $this->_plural();
$this->assertTrue(in_array('0 everything else (translated)', $plurals)); $this->assertTrue(in_array('0 everything else (translated)', $plurals));
$this->assertTrue(in_array('1 ends in 1 (translated)', $plurals)); $this->assertTrue(in_array('1 ends in 1 (translated)', $plurals));
$this->assertTrue(in_array('2 ends in 2 (translated)', $plurals)); $this->assertTrue(in_array('2 ends in 2 (translated)', $plurals));
@ -1481,10 +1481,10 @@ class I18nTest extends CakeTestCase {
$this->assertTrue(in_array('24 everything else (translated)', $plurals)); $this->assertTrue(in_array('24 everything else (translated)', $plurals));
$this->assertTrue(in_array('25 everything else (translated)', $plurals)); $this->assertTrue(in_array('25 everything else (translated)', $plurals));
$coreSingular = $this->__singularFromCore(); $coreSingular = $this->_singularFromCore();
$this->assertEquals('Plural Rule 14 (from core translated)', $coreSingular); $this->assertEquals('Plural Rule 14 (from core translated)', $coreSingular);
$corePlurals = $this->__pluralFromCore(); $corePlurals = $this->_pluralFromCore();
$this->assertTrue(in_array('0 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('0 everything else (from core translated)', $corePlurals));
$this->assertTrue(in_array('1 ends in 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('1 ends in 1 (from core translated)', $corePlurals));
$this->assertTrue(in_array('2 ends in 2 (from core translated)', $corePlurals)); $this->assertTrue(in_array('2 ends in 2 (from core translated)', $corePlurals));
@ -1520,10 +1520,10 @@ class I18nTest extends CakeTestCase {
*/ */
public function testSetLanguageWithSession() { public function testSetLanguageWithSession() {
$_SESSION['Config']['language'] = 'po'; $_SESSION['Config']['language'] = 'po';
$singular = $this->__singular(); $singular = $this->_singular();
$this->assertEquals('Po (translated)', $singular); $this->assertEquals('Po (translated)', $singular);
$plurals = $this->__plural(); $plurals = $this->_plural();
$this->assertTrue(in_array('0 everything else (po translated)', $plurals)); $this->assertTrue(in_array('0 everything else (po translated)', $plurals));
$this->assertTrue(in_array('1 is 1 (po translated)', $plurals)); $this->assertTrue(in_array('1 is 1 (po translated)', $plurals));
$this->assertTrue(in_array('2 is 2-4 (po translated)', $plurals)); $this->assertTrue(in_array('2 is 2-4 (po translated)', $plurals));
@ -1560,13 +1560,13 @@ class I18nTest extends CakeTestCase {
*/ */
public function testNoCoreTranslation() { public function testNoCoreTranslation() {
Configure::write('Config.language', 'po'); Configure::write('Config.language', 'po');
$singular = $this->__singular(); $singular = $this->_singular();
$this->assertEquals('Po (translated)', $singular); $this->assertEquals('Po (translated)', $singular);
$coreSingular = $this->__singularFromCore(); $coreSingular = $this->_singularFromCore();
$this->assertNotEquals('Po (from core translated)', $coreSingular); $this->assertNotEquals('Po (from core translated)', $coreSingular);
$corePlurals = $this->__pluralFromCore(); $corePlurals = $this->_pluralFromCore();
$this->assertFalse(in_array('0 everything else (from core translated)', $corePlurals)); $this->assertFalse(in_array('0 everything else (from core translated)', $corePlurals));
$this->assertFalse(in_array('1 is 1 (from core translated)', $corePlurals)); $this->assertFalse(in_array('1 is 1 (from core translated)', $corePlurals));
$this->assertFalse(in_array('2 is 2-4 (from core translated)', $corePlurals)); $this->assertFalse(in_array('2 is 2-4 (from core translated)', $corePlurals));
@ -1606,10 +1606,10 @@ class I18nTest extends CakeTestCase {
)); ));
Configure::write('Config.language', 'po'); Configure::write('Config.language', 'po');
$singular = $this->__domainSingular(); $singular = $this->_domainSingular();
$this->assertEquals('Plural Rule 1 (from plugin)', $singular); $this->assertEquals('Plural Rule 1 (from plugin)', $singular);
$plurals = $this->__domainPlural(); $plurals = $this->_domainPlural();
$this->assertTrue(in_array('0 = 0 or > 1 (from plugin)', $plurals)); $this->assertTrue(in_array('0 = 0 or > 1 (from plugin)', $plurals));
$this->assertTrue(in_array('1 = 1 (from plugin)', $plurals)); $this->assertTrue(in_array('1 = 1 (from plugin)', $plurals));
$this->assertTrue(in_array('2 = 0 or > 1 (from plugin)', $plurals)); $this->assertTrue(in_array('2 = 0 or > 1 (from plugin)', $plurals));
@ -1761,7 +1761,7 @@ class I18nTest extends CakeTestCase {
*/ */
public function testCategory() { public function testCategory() {
Configure::write('Config.language', 'po'); Configure::write('Config.language', 'po');
$category = $this->__category(); $category = $this->_category();
$this->assertEquals('Monetary Po (translated)', $category); $this->assertEquals('Monetary Po (translated)', $category);
} }
@ -1773,10 +1773,10 @@ class I18nTest extends CakeTestCase {
public function testPluginCategory() { public function testPluginCategory() {
Configure::write('Config.language', 'po'); Configure::write('Config.language', 'po');
$singular = $this->__domainCategorySingular(); $singular = $this->_domainCategorySingular();
$this->assertEquals('Monetary Plural Rule 1 (from plugin)', $singular); $this->assertEquals('Monetary Plural Rule 1 (from plugin)', $singular);
$plurals = $this->__domainCategoryPlural(); $plurals = $this->_domainCategoryPlural();
$this->assertTrue(in_array('Monetary 0 = 0 or > 1 (from plugin)', $plurals)); $this->assertTrue(in_array('Monetary 0 = 0 or > 1 (from plugin)', $plurals));
$this->assertTrue(in_array('Monetary 1 = 1 (from plugin)', $plurals)); $this->assertTrue(in_array('Monetary 1 = 1 (from plugin)', $plurals));
} }
@ -1788,10 +1788,10 @@ class I18nTest extends CakeTestCase {
*/ */
public function testCategoryThenSingular() { public function testCategoryThenSingular() {
Configure::write('Config.language', 'po'); Configure::write('Config.language', 'po');
$category = $this->__category(); $category = $this->_category();
$this->assertEquals('Monetary Po (translated)', $category); $this->assertEquals('Monetary Po (translated)', $category);
$singular = $this->__singular(); $singular = $this->_singular();
$this->assertEquals('Po (translated)', $singular); $this->assertEquals('Po (translated)', $singular);
} }
@ -1859,7 +1859,7 @@ class I18nTest extends CakeTestCase {
* *
* @return void * @return void
*/ */
private function __domainCategorySingular($domain = 'test_plugin', $category = 3) { protected function _domainCategorySingular($domain = 'test_plugin', $category = 3) {
$singular = __dc($domain, 'Plural Rule 1', $category); $singular = __dc($domain, 'Plural Rule 1', $category);
return $singular; return $singular;
} }
@ -1869,7 +1869,7 @@ class I18nTest extends CakeTestCase {
* *
* @return void * @return void
*/ */
private function __domainCategoryPlural($domain = 'test_plugin', $category = 3) { protected function _domainCategoryPlural($domain = 'test_plugin', $category = 3) {
$plurals = array(); $plurals = array();
for ($number = 0; $number <= 25; $number++) { for ($number = 0; $number <= 25; $number++) {
$plurals[] = sprintf(__dcn($domain, '%d = 1', '%d = 0 or > 1', (float)$number, $category), (float)$number); $plurals[] = sprintf(__dcn($domain, '%d = 1', '%d = 0 or > 1', (float)$number, $category), (float)$number);
@ -1882,7 +1882,7 @@ class I18nTest extends CakeTestCase {
* *
* @return void * @return void
*/ */
private function __domainSingular($domain = 'test_plugin') { protected function _domainSingular($domain = 'test_plugin') {
$singular = __d($domain, 'Plural Rule 1'); $singular = __d($domain, 'Plural Rule 1');
return $singular; return $singular;
} }
@ -1892,7 +1892,7 @@ class I18nTest extends CakeTestCase {
* *
* @return void * @return void
*/ */
private function __domainPlural($domain = 'test_plugin') { protected function _domainPlural($domain = 'test_plugin') {
$plurals = array(); $plurals = array();
for ($number = 0; $number <= 25; $number++) { for ($number = 0; $number <= 25; $number++) {
$plurals[] = sprintf(__dn($domain, '%d = 1', '%d = 0 or > 1', (float)$number), (float)$number); $plurals[] = sprintf(__dn($domain, '%d = 1', '%d = 0 or > 1', (float)$number), (float)$number);
@ -1905,7 +1905,7 @@ class I18nTest extends CakeTestCase {
* *
* @return void * @return void
*/ */
private function __category($category = 3) { protected function _category($category = 3) {
$singular = __c('Plural Rule 1', $category); $singular = __c('Plural Rule 1', $category);
return $singular; return $singular;
} }
@ -1915,7 +1915,7 @@ class I18nTest extends CakeTestCase {
* *
* @return void * @return void
*/ */
private function __singular() { protected function _singular() {
$singular = __('Plural Rule 1'); $singular = __('Plural Rule 1');
return $singular; return $singular;
} }
@ -1925,7 +1925,7 @@ class I18nTest extends CakeTestCase {
* *
* @return void * @return void
*/ */
private function __plural() { protected function _plural() {
$plurals = array(); $plurals = array();
for ($number = 0; $number <= 25; $number++) { for ($number = 0; $number <= 25; $number++) {
$plurals[] = sprintf(__n('%d = 1', '%d = 0 or > 1', (float)$number), (float)$number); $plurals[] = sprintf(__n('%d = 1', '%d = 0 or > 1', (float)$number), (float)$number);
@ -1938,7 +1938,7 @@ class I18nTest extends CakeTestCase {
* *
* @return void * @return void
*/ */
private function __singularFromCore() { protected function _singularFromCore() {
$singular = __('Plural Rule 1 (from core)'); $singular = __('Plural Rule 1 (from core)');
return $singular; return $singular;
} }
@ -1948,7 +1948,7 @@ class I18nTest extends CakeTestCase {
* *
* @return void * @return void
*/ */
private function __pluralFromCore() { protected function _pluralFromCore() {
$plurals = array(); $plurals = array();
for ($number = 0; $number <= 25; $number++) { for ($number = 0; $number <= 25; $number++) {
$plurals[] = sprintf(__n('%d = 1 (from core)', '%d = 0 or > 1 (from core)', (float)$number), (float)$number); $plurals[] = sprintf(__n('%d = 1 (from core)', '%d = 0 or > 1 (from core)', (float)$number), (float)$number);