code
stringlengths
31
1.39M
docstring
stringlengths
23
16.8k
func_name
stringlengths
1
126
language
stringclasses
1 value
repo
stringlengths
7
63
path
stringlengths
7
166
url
stringlengths
50
220
license
stringclasses
7 values
function testParseUri() { $this->Socket->reset(); $uri = $this->Socket->parseUri(array('invalid' => 'uri-string')); $this->assertIdentical($uri, false); $uri = $this->Socket->parseUri(array('invalid' => 'uri-string'), array('host' => 'somehost')); $this->assertIdentical($uri, array('host' => 'somehost', 'invalid' => 'uri-string')); $uri = $this->Socket->parseUri(false); $this->assertIdentical($uri, false); $uri = $this->Socket->parseUri('/my-cool-path'); $this->assertIdentical($uri, array('path' => '/my-cool-path')); $uri = $this->Socket->parseUri('http://bob:[email protected]:40/search?q=dessert#results'); $this->assertIdentical($uri, array( 'scheme' => 'http', 'host' => 'www.cakephp.org', 'port' => 40, 'user' => 'bob', 'pass' => 'foo123', 'path' => '/search', 'query' => array('q' => 'dessert'), 'fragment' => 'results' )); $uri = $this->Socket->parseUri('http://www.cakephp.org/'); $this->assertIdentical($uri, array( 'scheme' => 'http', 'host' => 'www.cakephp.org', 'path' => '/', )); $uri = $this->Socket->parseUri('http://www.cakephp.org', true); $this->assertIdentical($uri, array( 'scheme' => 'http', 'host' => 'www.cakephp.org', 'port' => 80, 'user' => null, 'pass' => null, 'path' => '/', 'query' => array(), 'fragment' => null )); $uri = $this->Socket->parseUri('https://www.cakephp.org', true); $this->assertIdentical($uri, array( 'scheme' => 'https', 'host' => 'www.cakephp.org', 'port' => 443, 'user' => null, 'pass' => null, 'path' => '/', 'query' => array(), 'fragment' => null )); $uri = $this->Socket->parseUri('www.cakephp.org:443/query?foo', true); $this->assertIdentical($uri, array( 'scheme' => 'https', 'host' => 'www.cakephp.org', 'port' => 443, 'user' => null, 'pass' => null, 'path' => '/query', 'query' => array('foo' => ""), 'fragment' => null )); $uri = $this->Socket->parseUri('http://www.cakephp.org', array('host' => 'piephp.org', 'user' => 'bob', 'fragment' => 'results')); $this->assertIdentical($uri, array( 'host' => 'www.cakephp.org', 'user' => 'bob', 'fragment' => 'results', 'scheme' => 'http' )); $uri = $this->Socket->parseUri('https://www.cakephp.org', array('scheme' => 'http', 'port' => 23)); $this->assertIdentical($uri, array( 'scheme' => 'https', 'port' => 23, 'host' => 'www.cakephp.org' )); $uri = $this->Socket->parseUri('www.cakephp.org:59', array('scheme' => array('http', 'https'), 'port' => 80)); $this->assertIdentical($uri, array( 'scheme' => 'http', 'port' => 59, 'host' => 'www.cakephp.org' )); $uri = $this->Socket->parseUri(array('scheme' => 'http', 'host' => 'www.google.com', 'port' => 8080), array('scheme' => array('http', 'https'), 'host' => 'www.google.com', 'port' => array(80, 443))); $this->assertIdentical($uri, array( 'scheme' => 'http', 'host' => 'www.google.com', 'port' => 8080, )); $uri = $this->Socket->parseUri('http://www.cakephp.org/?param1=value1&param2=value2%3Dvalue3'); $this->assertIdentical($uri, array( 'scheme' => 'http', 'host' => 'www.cakephp.org', 'path' => '/', 'query' => array( 'param1' => 'value1', 'param2' => 'value2=value3' ) )); $uri = $this->Socket->parseUri('http://www.cakephp.org/?param1=value1&param2=value2=value3'); $this->assertIdentical($uri, array( 'scheme' => 'http', 'host' => 'www.cakephp.org', 'path' => '/', 'query' => array( 'param1' => 'value1', 'param2' => 'value2=value3' ) )); }
Asserts that HttpSocket::parseUri is working properly @access public @return void
testParseUri
php
Datawalke/Coordino
cake/tests/cases/libs/http_socket.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/http_socket.test.php
MIT
function testBuildUri() { $this->Socket->reset(); $r = $this->Socket->buildUri(true); $this->assertIdentical($r, false); $r = $this->Socket->buildUri('foo.com'); $this->assertIdentical($r, 'http://foo.com/'); $r = $this->Socket->buildUri(array('host' => 'www.cakephp.org')); $this->assertIdentical($r, 'http://www.cakephp.org/'); $r = $this->Socket->buildUri(array('host' => 'www.cakephp.org', 'scheme' => 'https')); $this->assertIdentical($r, 'https://www.cakephp.org/'); $r = $this->Socket->buildUri(array('host' => 'www.cakephp.org', 'port' => 23)); $this->assertIdentical($r, 'http://www.cakephp.org:23/'); $r = $this->Socket->buildUri(array('path' => 'www.google.com/search', 'query' => 'q=cakephp')); $this->assertIdentical($r, 'http://www.google.com/search?q=cakephp'); $r = $this->Socket->buildUri(array('host' => 'www.cakephp.org', 'scheme' => 'https', 'port' => 79)); $this->assertIdentical($r, 'https://www.cakephp.org:79/'); $r = $this->Socket->buildUri(array('host' => 'www.cakephp.org', 'path' => 'foo')); $this->assertIdentical($r, 'http://www.cakephp.org/foo'); $r = $this->Socket->buildUri(array('host' => 'www.cakephp.org', 'path' => '/foo')); $this->assertIdentical($r, 'http://www.cakephp.org/foo'); $r = $this->Socket->buildUri(array('host' => 'www.cakephp.org', 'path' => '/search', 'query' => array('q' => 'HttpSocket'))); $this->assertIdentical($r, 'http://www.cakephp.org/search?q=HttpSocket'); $r = $this->Socket->buildUri(array('host' => 'www.cakephp.org', 'fragment' => 'bar')); $this->assertIdentical($r, 'http://www.cakephp.org/#bar'); $r = $this->Socket->buildUri(array( 'scheme' => 'https', 'host' => 'www.cakephp.org', 'port' => 25, 'user' => 'bob', 'pass' => 'secret', 'path' => '/cool', 'query' => array('foo' => 'bar'), 'fragment' => 'comment' )); $this->assertIdentical($r, 'https://bob:[email protected]:25/cool?foo=bar#comment'); $r = $this->Socket->buildUri(array('host' => 'www.cakephp.org', 'fragment' => 'bar'), '%fragment?%host'); $this->assertIdentical($r, 'bar?www.cakephp.org'); $r = $this->Socket->buildUri(array('host' => 'www.cakephp.org'), '%fragment???%host'); $this->assertIdentical($r, '???www.cakephp.org'); $r = $this->Socket->buildUri(array('path' => '*'), '/%path?%query'); $this->assertIdentical($r, '*'); $r = $this->Socket->buildUri(array('scheme' => 'foo', 'host' => 'www.cakephp.org')); $this->assertIdentical($r, 'foo://www.cakephp.org:80/'); }
Tests that HttpSocket::buildUri can turn all kinds of uri arrays (and strings) into fully or partially qualified URI's @access public @return void
testBuildUri
php
Datawalke/Coordino
cake/tests/cases/libs/http_socket.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/http_socket.test.php
MIT
function testParseQuery() { $this->Socket->reset(); $query = $this->Socket->parseQuery(array('framework' => 'cakephp')); $this->assertIdentical($query, array('framework' => 'cakephp')); $query = $this->Socket->parseQuery(''); $this->assertIdentical($query, array()); $query = $this->Socket->parseQuery('framework=cakephp'); $this->assertIdentical($query, array('framework' => 'cakephp')); $query = $this->Socket->parseQuery('?framework=cakephp'); $this->assertIdentical($query, array('framework' => 'cakephp')); $query = $this->Socket->parseQuery('a&b&c'); $this->assertIdentical($query, array('a' => '', 'b' => '', 'c' => '')); $query = $this->Socket->parseQuery('value=12345'); $this->assertIdentical($query, array('value' => '12345')); $query = $this->Socket->parseQuery('a[0]=foo&a[1]=bar&a[2]=cake'); $this->assertIdentical($query, array('a' => array(0 => 'foo', 1 => 'bar', 2 => 'cake'))); $query = $this->Socket->parseQuery('a[]=foo&a[]=bar&a[]=cake'); $this->assertIdentical($query, array('a' => array(0 => 'foo', 1 => 'bar', 2 => 'cake'))); $query = $this->Socket->parseQuery('a]][[=foo&[]=bar&]]][]=cake'); $this->assertIdentical($query, array('a]][[' => 'foo', 0 => 'bar', ']]]' => array('cake'))); $query = $this->Socket->parseQuery('a[][]=foo&a[][]=bar&a[][]=cake'); $expectedQuery = array( 'a' => array( 0 => array( 0 => 'foo' ), 1 => array( 0 => 'bar' ), array( 0 => 'cake' ) ) ); $this->assertIdentical($query, $expectedQuery); $query = $this->Socket->parseQuery('a[][]=foo&a[bar]=php&a[][]=bar&a[][]=cake'); $expectedQuery = array( 'a' => array( 0 => array( 0 => 'foo' ), 'bar' => 'php', 1 => array( 0 => 'bar' ), array( 0 => 'cake' ) ) ); $this->assertIdentical($query, $expectedQuery); $query = $this->Socket->parseQuery('user[]=jim&user[3]=tom&user[]=bob'); $expectedQuery = array( 'user' => array( 0 => 'jim', 3 => 'tom', 4 => 'bob' ) ); $this->assertIdentical($query, $expectedQuery); $queryStr = 'user[0]=foo&user[0][items][]=foo&user[0][items][]=bar&user[][name]=jim&user[1][items][personal][]=book&user[1][items][personal][]=pen&user[1][items][]=ball&user[count]=2&empty'; $query = $this->Socket->parseQuery($queryStr); $expectedQuery = array( 'user' => array( 0 => array( 'items' => array( 'foo', 'bar' ) ), 1 => array( 'name' => 'jim', 'items' => array( 'personal' => array( 'book' , 'pen' ), 'ball' ) ), 'count' => '2' ), 'empty' => '' ); $this->assertIdentical($query, $expectedQuery); }
Asserts that HttpSocket::parseQuery is working properly @access public @return void
testParseQuery
php
Datawalke/Coordino
cake/tests/cases/libs/http_socket.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/http_socket.test.php
MIT
function testBuildHeader() { $this->Socket->reset(); $r = $this->Socket->buildHeader(true); $this->assertIdentical($r, false); $r = $this->Socket->buildHeader('My raw header'); $this->assertIdentical($r, 'My raw header'); $r = $this->Socket->buildHeader(array('Host' => 'www.cakephp.org')); $this->assertIdentical($r, "Host: www.cakephp.org\r\n"); $r = $this->Socket->buildHeader(array('Host' => 'www.cakephp.org', 'Connection' => 'Close')); $this->assertIdentical($r, "Host: www.cakephp.org\r\nConnection: Close\r\n"); $r = $this->Socket->buildHeader(array('People' => array('Bob', 'Jim', 'John'))); $this->assertIdentical($r, "People: Bob,Jim,John\r\n"); $r = $this->Socket->buildHeader(array('Multi-Line-Field' => "This is my\r\nMulti Line field")); $this->assertIdentical($r, "Multi-Line-Field: This is my\r\n Multi Line field\r\n"); $r = $this->Socket->buildHeader(array('Multi-Line-Field' => "This is my\r\n Multi Line field")); $this->assertIdentical($r, "Multi-Line-Field: This is my\r\n Multi Line field\r\n"); $r = $this->Socket->buildHeader(array('Multi-Line-Field' => "This is my\r\n\tMulti Line field")); $this->assertIdentical($r, "Multi-Line-Field: This is my\r\n\tMulti Line field\r\n"); $r = $this->Socket->buildHeader(array('Test@Field' => "My value")); $this->assertIdentical($r, "Test\"@\"Field: My value\r\n"); }
Tests that HttpSocket::buildHeader can turn a given $header array into a proper header string according to HTTP 1.1 specs. @access public @return void
testBuildHeader
php
Datawalke/Coordino
cake/tests/cases/libs/http_socket.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/http_socket.test.php
MIT
function testParseHeader() { $this->Socket->reset(); $r = $this->Socket->parseHeader(array('foo' => 'Bar', 'fOO-bAr' => 'quux')); $this->assertIdentical($r, array('Foo' => 'Bar', 'Foo-Bar' => 'quux')); $r = $this->Socket->parseHeader(true); $this->assertIdentical($r, false); $header = "Host: cakephp.org\t\r\n"; $r = $this->Socket->parseHeader($header); $expected = array( 'Host' => 'cakephp.org' ); $this->assertIdentical($r, $expected); $header = "Date:Sat, 07 Apr 2007 10:10:25 GMT\r\nX-Powered-By: PHP/5.1.2\r\n"; $r = $this->Socket->parseHeader($header); $expected = array( 'Date' => 'Sat, 07 Apr 2007 10:10:25 GMT' , 'X-Powered-By' => 'PHP/5.1.2' ); $this->assertIdentical($r, $expected); $header = "people: Jim,John\r\nfoo-LAND: Bar\r\ncAKe-PHP: rocks\r\n"; $r = $this->Socket->parseHeader($header); $expected = array( 'People' => 'Jim,John' , 'Foo-Land' => 'Bar' , 'Cake-Php' => 'rocks' ); $this->assertIdentical($r, $expected); $header = "People: Jim,John,Tim\r\nPeople: Lisa,Tina,Chelsea\r\n"; $r = $this->Socket->parseHeader($header); $expected = array( 'People' => array('Jim,John,Tim', 'Lisa,Tina,Chelsea') ); $this->assertIdentical($r, $expected); $header = "Multi-Line: I am a \r\nmulti line\t\r\nfield value.\r\nSingle-Line: I am not\r\n"; $r = $this->Socket->parseHeader($header); $expected = array( 'Multi-Line' => "I am a\r\nmulti line\r\nfield value." , 'Single-Line' => 'I am not' ); $this->assertIdentical($r, $expected); $header = "Esc\"@\"ped: value\r\n"; $r = $this->Socket->parseHeader($header); $expected = array( 'Esc@ped' => 'value' ); $this->assertIdentical($r, $expected); }
Test that HttpSocket::parseHeader can take apart a given (and valid) $header string and turn it into an array. @access public @return void
testParseHeader
php
Datawalke/Coordino
cake/tests/cases/libs/http_socket.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/http_socket.test.php
MIT
function testParseCookies() { $header = array( 'Set-Cookie' => array( 'foo=bar', 'people=jim,jack,johnny";";Path=/accounts', 'google=not=nice' ), 'Transfer-Encoding' => 'chunked', 'Date' => 'Sun, 18 Nov 2007 18:57:42 GMT', ); $cookies = $this->Socket->parseCookies($header); $expected = array( 'foo' => array( 'value' => 'bar' ), 'people' => array( 'value' => 'jim,jack,johnny";"', 'path' => '/accounts', ), 'google' => array( 'value' => 'not=nice', ) ); $this->assertEqual($cookies, $expected); $header['Set-Cookie'][] = 'cakephp=great; Secure'; $expected['cakephp'] = array('value' => 'great', 'secure' => true); $cookies = $this->Socket->parseCookies($header); $this->assertEqual($cookies, $expected); $header['Set-Cookie'] = 'foo=bar'; unset($expected['people'], $expected['cakephp'], $expected['google']); $cookies = $this->Socket->parseCookies($header); $this->assertEqual($cookies, $expected); }
testParseCookies method @access public @return void
testParseCookies
php
Datawalke/Coordino
cake/tests/cases/libs/http_socket.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/http_socket.test.php
MIT
function testBuildCookies() { $cookies = array( 'foo' => array( 'value' => 'bar' ), 'people' => array( 'value' => 'jim,jack,johnny;', 'path' => '/accounts' ) ); $expect = "Cookie: foo=bar; people=jim,jack,johnny\";\"\r\n"; $result = $this->Socket->buildCookies($cookies); $this->assertEqual($result, $expect); }
testBuildCookies method @return void @access public @todo Test more scenarios
testBuildCookies
php
Datawalke/Coordino
cake/tests/cases/libs/http_socket.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/http_socket.test.php
MIT
function testTokenEscapeChars() { $this->Socket->reset(); $expected = array( '\x22','\x28','\x29','\x3c','\x3e','\x40','\x2c','\x3b','\x3a','\x5c','\x2f','\x5b','\x5d','\x3f','\x3d','\x7b', '\x7d','\x20','\x00','\x01','\x02','\x03','\x04','\x05','\x06','\x07','\x08','\x09','\x0a','\x0b','\x0c','\x0d', '\x0e','\x0f','\x10','\x11','\x12','\x13','\x14','\x15','\x16','\x17','\x18','\x19','\x1a','\x1b','\x1c','\x1d', '\x1e','\x1f','\x7f' ); $r = $this->Socket->tokenEscapeChars(); $this->assertEqual($r, $expected); foreach ($expected as $key => $char) { $expected[$key] = chr(hexdec(substr($char, 2))); } $r = $this->Socket->tokenEscapeChars(false); $this->assertEqual($r, $expected); }
Tests that HttpSocket::_tokenEscapeChars() returns the right characters. @access public @return void
testTokenEscapeChars
php
Datawalke/Coordino
cake/tests/cases/libs/http_socket.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/http_socket.test.php
MIT
function testEscapeToken() { $this->Socket->reset(); $this->assertIdentical($this->Socket->escapeToken('Foo'), 'Foo'); $escape = $this->Socket->tokenEscapeChars(false); foreach ($escape as $char) { $token = 'My-special-'.$char.'-Token'; $escapedToken = $this->Socket->escapeToken($token); $expectedToken = 'My-special-"'.$char.'"-Token'; $this->assertIdentical($escapedToken, $expectedToken, 'Test token escaping for ASCII '.ord($char)); } $token = 'Extreme-:Token- -"@-test'; $escapedToken = $this->Socket->escapeToken($token); $expectedToken = 'Extreme-":"Token-" "-""""@"-test'; $this->assertIdentical($expectedToken, $escapedToken); }
Test that HttpSocket::escapeToken is escaping all characters as descriped in RFC 2616 (HTTP 1.1 specs) @access public @return void
testEscapeToken
php
Datawalke/Coordino
cake/tests/cases/libs/http_socket.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/http_socket.test.php
MIT
function testUnescapeToken() { $this->Socket->reset(); $this->assertIdentical($this->Socket->unescapeToken('Foo'), 'Foo'); $escape = $this->Socket->tokenEscapeChars(false); foreach ($escape as $char) { $token = 'My-special-"'.$char.'"-Token'; $unescapedToken = $this->Socket->unescapeToken($token); $expectedToken = 'My-special-'.$char.'-Token'; $this->assertIdentical($unescapedToken, $expectedToken, 'Test token unescaping for ASCII '.ord($char)); } $token = 'Extreme-":"Token-" "-""""@"-test'; $escapedToken = $this->Socket->unescapeToken($token); $expectedToken = 'Extreme-:Token- -"@-test'; $this->assertIdentical($expectedToken, $escapedToken); }
Test that escaped token strings are properly unescaped by HttpSocket::unescapeToken @access public @return void
testUnescapeToken
php
Datawalke/Coordino
cake/tests/cases/libs/http_socket.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/http_socket.test.php
MIT
function testReset() { $this->Socket->reset(); $initialState = get_class_vars('HttpSocket'); foreach ($initialState as $property => $value) { $this->Socket->{$property} = 'Overwritten'; } $return = $this->Socket->reset(); foreach ($initialState as $property => $value) { $this->assertIdentical($this->Socket->{$property}, $value); } $this->assertIdentical($return, true); }
This tests asserts HttpSocket::reset() resets a HttpSocket instance to it's initial state (before Object::__construct got executed) @access public @return void
testReset
php
Datawalke/Coordino
cake/tests/cases/libs/http_socket.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/http_socket.test.php
MIT
function testPartialReset() { $this->Socket->reset(); $partialResetProperties = array('request', 'response'); $initialState = get_class_vars('HttpSocket'); foreach ($initialState as $property => $value) { $this->Socket->{$property} = 'Overwritten'; } $return = $this->Socket->reset(false); foreach ($initialState as $property => $originalValue) { if (in_array($property, $partialResetProperties)) { $this->assertIdentical($this->Socket->{$property}, $originalValue); } else { $this->assertIdentical($this->Socket->{$property}, 'Overwritten'); } } $this->assertIdentical($return, true); }
This tests asserts HttpSocket::reset(false) resets certain HttpSocket properties to their initial state (before Object::__construct got executed). @access public @return void
testPartialReset
php
Datawalke/Coordino
cake/tests/cases/libs/http_socket.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/http_socket.test.php
MIT
function setUp() { Cache::delete('object_map', '_cake_core_'); App::build(array( 'locales' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'locale' . DS), 'plugins' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS) ), true); App::objects('plugin', null, false); }
setUp method @access public @return void
setUp
php
Datawalke/Coordino
cake/tests/cases/libs/i18n.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/i18n.test.php
MIT
function tearDown() { Cache::delete('object_map', '_cake_core_'); App::build(); App::objects('plugin', null, false); }
tearDown method @access public @return void
tearDown
php
Datawalke/Coordino
cake/tests/cases/libs/i18n.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/i18n.test.php
MIT
function testDefaultStrings() { $singular = $this->__singular(); $this->assertEqual('Plural Rule 1', $singular); $plurals = $this->__plural(); $this->assertTrue(in_array('0 = 0 or > 1', $plurals)); $this->assertTrue(in_array('1 = 1', $plurals)); $this->assertTrue(in_array('2 = 0 or > 1', $plurals)); $this->assertTrue(in_array('3 = 0 or > 1', $plurals)); $this->assertTrue(in_array('4 = 0 or > 1', $plurals)); $this->assertTrue(in_array('5 = 0 or > 1', $plurals)); $this->assertTrue(in_array('6 = 0 or > 1', $plurals)); $this->assertTrue(in_array('7 = 0 or > 1', $plurals)); $this->assertTrue(in_array('8 = 0 or > 1', $plurals)); $this->assertTrue(in_array('9 = 0 or > 1', $plurals)); $this->assertTrue(in_array('10 = 0 or > 1', $plurals)); $this->assertTrue(in_array('11 = 0 or > 1', $plurals)); $this->assertTrue(in_array('12 = 0 or > 1', $plurals)); $this->assertTrue(in_array('13 = 0 or > 1', $plurals)); $this->assertTrue(in_array('14 = 0 or > 1', $plurals)); $this->assertTrue(in_array('15 = 0 or > 1', $plurals)); $this->assertTrue(in_array('16 = 0 or > 1', $plurals)); $this->assertTrue(in_array('17 = 0 or > 1', $plurals)); $this->assertTrue(in_array('18 = 0 or > 1', $plurals)); $this->assertTrue(in_array('19 = 0 or > 1', $plurals)); $this->assertTrue(in_array('20 = 0 or > 1', $plurals)); $this->assertTrue(in_array('21 = 0 or > 1', $plurals)); $this->assertTrue(in_array('22 = 0 or > 1', $plurals)); $this->assertTrue(in_array('23 = 0 or > 1', $plurals)); $this->assertTrue(in_array('24 = 0 or > 1', $plurals)); $this->assertTrue(in_array('25 = 0 or > 1', $plurals)); $coreSingular = $this->__singularFromCore(); $this->assertEqual('Plural Rule 1 (from core)', $coreSingular); $corePlurals = $this->__pluralFromCore(); $this->assertTrue(in_array('0 = 0 or > 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('3 = 0 or > 1 (from core)', $corePlurals)); $this->assertTrue(in_array('4 = 0 or > 1 (from core)', $corePlurals)); $this->assertTrue(in_array('5 = 0 or > 1 (from core)', $corePlurals)); $this->assertTrue(in_array('6 = 0 or > 1 (from core)', $corePlurals)); $this->assertTrue(in_array('7 = 0 or > 1 (from core)', $corePlurals)); $this->assertTrue(in_array('8 = 0 or > 1 (from core)', $corePlurals)); $this->assertTrue(in_array('9 = 0 or > 1 (from core)', $corePlurals)); $this->assertTrue(in_array('10 = 0 or > 1 (from core)', $corePlurals)); $this->assertTrue(in_array('11 = 0 or > 1 (from core)', $corePlurals)); $this->assertTrue(in_array('12 = 0 or > 1 (from core)', $corePlurals)); $this->assertTrue(in_array('13 = 0 or > 1 (from core)', $corePlurals)); $this->assertTrue(in_array('14 = 0 or > 1 (from core)', $corePlurals)); $this->assertTrue(in_array('15 = 0 or > 1 (from core)', $corePlurals)); $this->assertTrue(in_array('16 = 0 or > 1 (from core)', $corePlurals)); $this->assertTrue(in_array('17 = 0 or > 1 (from core)', $corePlurals)); $this->assertTrue(in_array('18 = 0 or > 1 (from core)', $corePlurals)); $this->assertTrue(in_array('19 = 0 or > 1 (from core)', $corePlurals)); $this->assertTrue(in_array('20 = 0 or > 1 (from core)', $corePlurals)); $this->assertTrue(in_array('21 = 0 or > 1 (from core)', $corePlurals)); $this->assertTrue(in_array('22 = 0 or > 1 (from core)', $corePlurals)); $this->assertTrue(in_array('23 = 0 or > 1 (from core)', $corePlurals)); $this->assertTrue(in_array('24 = 0 or > 1 (from core)', $corePlurals)); $this->assertTrue(in_array('25 = 0 or > 1 (from core)', $corePlurals)); }
testDefaultStrings method @access public @return void
testDefaultStrings
php
Datawalke/Coordino
cake/tests/cases/libs/i18n.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/i18n.test.php
MIT
function testPoRulesZero() { Configure::write('Config.language', 'rule_0_po'); $singular = $this->__singular(); $this->assertEqual('Plural Rule 0 (translated)', $singular); $plurals = $this->__plural(); $this->assertTrue(in_array('0 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('3 ends with any # (translated)', $plurals)); $this->assertTrue(in_array('4 ends with any # (translated)', $plurals)); $this->assertTrue(in_array('5 ends with any # (translated)', $plurals)); $this->assertTrue(in_array('6 ends with any # (translated)', $plurals)); $this->assertTrue(in_array('7 ends with any # (translated)', $plurals)); $this->assertTrue(in_array('8 ends with any # (translated)', $plurals)); $this->assertTrue(in_array('9 ends with any # (translated)', $plurals)); $this->assertTrue(in_array('10 ends with any # (translated)', $plurals)); $this->assertTrue(in_array('11 ends with any # (translated)', $plurals)); $this->assertTrue(in_array('12 ends with any # (translated)', $plurals)); $this->assertTrue(in_array('13 ends with any # (translated)', $plurals)); $this->assertTrue(in_array('14 ends with any # (translated)', $plurals)); $this->assertTrue(in_array('15 ends with any # (translated)', $plurals)); $this->assertTrue(in_array('16 ends with any # (translated)', $plurals)); $this->assertTrue(in_array('17 ends with any # (translated)', $plurals)); $this->assertTrue(in_array('18 ends with any # (translated)', $plurals)); $this->assertTrue(in_array('19 ends with any # (translated)', $plurals)); $this->assertTrue(in_array('20 ends with any # (translated)', $plurals)); $this->assertTrue(in_array('21 ends with any # (translated)', $plurals)); $this->assertTrue(in_array('22 ends with any # (translated)', $plurals)); $this->assertTrue(in_array('23 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)); $coreSingular = $this->__singularFromCore(); $this->assertEqual('Plural Rule 0 (from core translated)', $coreSingular); $corePlurals = $this->__pluralFromCore(); $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('2 ends with any # (from core translated)', $corePlurals)); $this->assertTrue(in_array('3 ends with any # (from core translated)', $corePlurals)); $this->assertTrue(in_array('4 ends with any # (from core translated)', $corePlurals)); $this->assertTrue(in_array('5 ends with any # (from core translated)', $corePlurals)); $this->assertTrue(in_array('6 ends with any # (from core translated)', $corePlurals)); $this->assertTrue(in_array('7 ends with any # (from core translated)', $corePlurals)); $this->assertTrue(in_array('8 ends with any # (from core translated)', $corePlurals)); $this->assertTrue(in_array('9 ends with any # (from core translated)', $corePlurals)); $this->assertTrue(in_array('10 ends with any # (from core translated)', $corePlurals)); $this->assertTrue(in_array('11 ends with any # (from core translated)', $corePlurals)); $this->assertTrue(in_array('12 ends with any # (from core translated)', $corePlurals)); $this->assertTrue(in_array('13 ends with any # (from core translated)', $corePlurals)); $this->assertTrue(in_array('14 ends with any # (from core translated)', $corePlurals)); $this->assertTrue(in_array('15 ends with any # (from core translated)', $corePlurals)); $this->assertTrue(in_array('16 ends with any # (from core translated)', $corePlurals)); $this->assertTrue(in_array('17 ends with any # (from core translated)', $corePlurals)); $this->assertTrue(in_array('18 ends with any # (from core translated)', $corePlurals)); $this->assertTrue(in_array('19 ends with any # (from core translated)', $corePlurals)); $this->assertTrue(in_array('20 ends with any # (from core translated)', $corePlurals)); $this->assertTrue(in_array('21 ends with any # (from core translated)', $corePlurals)); $this->assertTrue(in_array('22 ends with any # (from core translated)', $corePlurals)); $this->assertTrue(in_array('23 ends with any # (from core translated)', $corePlurals)); $this->assertTrue(in_array('24 ends with any # (from core translated)', $corePlurals)); $this->assertTrue(in_array('25 ends with any # (from core translated)', $corePlurals)); }
testPoRulesZero method @access public @return void
testPoRulesZero
php
Datawalke/Coordino
cake/tests/cases/libs/i18n.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/i18n.test.php
MIT
function testMoRulesZero() { Configure::write('Config.language', 'rule_0_mo'); $singular = $this->__singular(); $this->assertEqual('Plural Rule 0 (translated)', $singular); $plurals = $this->__plural(); $this->assertTrue(in_array('0 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('3 ends with any # (translated)', $plurals)); $this->assertTrue(in_array('4 ends with any # (translated)', $plurals)); $this->assertTrue(in_array('5 ends with any # (translated)', $plurals)); $this->assertTrue(in_array('6 ends with any # (translated)', $plurals)); $this->assertTrue(in_array('7 ends with any # (translated)', $plurals)); $this->assertTrue(in_array('8 ends with any # (translated)', $plurals)); $this->assertTrue(in_array('9 ends with any # (translated)', $plurals)); $this->assertTrue(in_array('10 ends with any # (translated)', $plurals)); $this->assertTrue(in_array('11 ends with any # (translated)', $plurals)); $this->assertTrue(in_array('12 ends with any # (translated)', $plurals)); $this->assertTrue(in_array('13 ends with any # (translated)', $plurals)); $this->assertTrue(in_array('14 ends with any # (translated)', $plurals)); $this->assertTrue(in_array('15 ends with any # (translated)', $plurals)); $this->assertTrue(in_array('16 ends with any # (translated)', $plurals)); $this->assertTrue(in_array('17 ends with any # (translated)', $plurals)); $this->assertTrue(in_array('18 ends with any # (translated)', $plurals)); $this->assertTrue(in_array('19 ends with any # (translated)', $plurals)); $this->assertTrue(in_array('20 ends with any # (translated)', $plurals)); $this->assertTrue(in_array('21 ends with any # (translated)', $plurals)); $this->assertTrue(in_array('22 ends with any # (translated)', $plurals)); $this->assertTrue(in_array('23 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)); $coreSingular = $this->__singularFromCore(); $this->assertEqual('Plural Rule 0 (from core translated)', $coreSingular); $corePlurals = $this->__pluralFromCore(); $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('2 ends with any # (from core translated)', $corePlurals)); $this->assertTrue(in_array('3 ends with any # (from core translated)', $corePlurals)); $this->assertTrue(in_array('4 ends with any # (from core translated)', $corePlurals)); $this->assertTrue(in_array('5 ends with any # (from core translated)', $corePlurals)); $this->assertTrue(in_array('6 ends with any # (from core translated)', $corePlurals)); $this->assertTrue(in_array('7 ends with any # (from core translated)', $corePlurals)); $this->assertTrue(in_array('8 ends with any # (from core translated)', $corePlurals)); $this->assertTrue(in_array('9 ends with any # (from core translated)', $corePlurals)); $this->assertTrue(in_array('10 ends with any # (from core translated)', $corePlurals)); $this->assertTrue(in_array('11 ends with any # (from core translated)', $corePlurals)); $this->assertTrue(in_array('12 ends with any # (from core translated)', $corePlurals)); $this->assertTrue(in_array('13 ends with any # (from core translated)', $corePlurals)); $this->assertTrue(in_array('14 ends with any # (from core translated)', $corePlurals)); $this->assertTrue(in_array('15 ends with any # (from core translated)', $corePlurals)); $this->assertTrue(in_array('16 ends with any # (from core translated)', $corePlurals)); $this->assertTrue(in_array('17 ends with any # (from core translated)', $corePlurals)); $this->assertTrue(in_array('18 ends with any # (from core translated)', $corePlurals)); $this->assertTrue(in_array('19 ends with any # (from core translated)', $corePlurals)); $this->assertTrue(in_array('20 ends with any # (from core translated)', $corePlurals)); $this->assertTrue(in_array('21 ends with any # (from core translated)', $corePlurals)); $this->assertTrue(in_array('22 ends with any # (from core translated)', $corePlurals)); $this->assertTrue(in_array('23 ends with any # (from core translated)', $corePlurals)); $this->assertTrue(in_array('24 ends with any # (from core translated)', $corePlurals)); $this->assertTrue(in_array('25 ends with any # (from core translated)', $corePlurals)); }
testMoRulesZero method @access public @return void
testMoRulesZero
php
Datawalke/Coordino
cake/tests/cases/libs/i18n.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/i18n.test.php
MIT
function testPoRulesOne() { Configure::write('Config.language', 'rule_1_po'); $singular = $this->__singular(); $this->assertEqual('Plural Rule 1 (translated)', $singular); $plurals = $this->__plural(); $this->assertTrue(in_array('0 = 0 or > 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('3 = 0 or > 1 (translated)', $plurals)); $this->assertTrue(in_array('4 = 0 or > 1 (translated)', $plurals)); $this->assertTrue(in_array('5 = 0 or > 1 (translated)', $plurals)); $this->assertTrue(in_array('6 = 0 or > 1 (translated)', $plurals)); $this->assertTrue(in_array('7 = 0 or > 1 (translated)', $plurals)); $this->assertTrue(in_array('8 = 0 or > 1 (translated)', $plurals)); $this->assertTrue(in_array('9 = 0 or > 1 (translated)', $plurals)); $this->assertTrue(in_array('10 = 0 or > 1 (translated)', $plurals)); $this->assertTrue(in_array('11 = 0 or > 1 (translated)', $plurals)); $this->assertTrue(in_array('12 = 0 or > 1 (translated)', $plurals)); $this->assertTrue(in_array('13 = 0 or > 1 (translated)', $plurals)); $this->assertTrue(in_array('14 = 0 or > 1 (translated)', $plurals)); $this->assertTrue(in_array('15 = 0 or > 1 (translated)', $plurals)); $this->assertTrue(in_array('16 = 0 or > 1 (translated)', $plurals)); $this->assertTrue(in_array('17 = 0 or > 1 (translated)', $plurals)); $this->assertTrue(in_array('18 = 0 or > 1 (translated)', $plurals)); $this->assertTrue(in_array('19 = 0 or > 1 (translated)', $plurals)); $this->assertTrue(in_array('20 = 0 or > 1 (translated)', $plurals)); $this->assertTrue(in_array('21 = 0 or > 1 (translated)', $plurals)); $this->assertTrue(in_array('22 = 0 or > 1 (translated)', $plurals)); $this->assertTrue(in_array('23 = 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)); $coreSingular = $this->__singularFromCore(); $this->assertEqual('Plural Rule 1 (from core translated)', $coreSingular); $corePlurals = $this->__pluralFromCore(); $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('2 = 0 or > 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('3 = 0 or > 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('4 = 0 or > 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('5 = 0 or > 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('6 = 0 or > 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('7 = 0 or > 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('8 = 0 or > 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('9 = 0 or > 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('10 = 0 or > 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('11 = 0 or > 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('12 = 0 or > 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('13 = 0 or > 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('14 = 0 or > 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('15 = 0 or > 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('16 = 0 or > 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('17 = 0 or > 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('18 = 0 or > 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('19 = 0 or > 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('20 = 0 or > 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('21 = 0 or > 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('22 = 0 or > 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('23 = 0 or > 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('24 = 0 or > 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('25 = 0 or > 1 (from core translated)', $corePlurals)); }
testPoRulesOne method @access public @return void
testPoRulesOne
php
Datawalke/Coordino
cake/tests/cases/libs/i18n.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/i18n.test.php
MIT
function testMoRulesOne() { Configure::write('Config.language', 'rule_1_mo'); $singular = $this->__singular(); $this->assertEqual('Plural Rule 1 (translated)', $singular); $plurals = $this->__plural(); $this->assertTrue(in_array('0 = 0 or > 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('3 = 0 or > 1 (translated)', $plurals)); $this->assertTrue(in_array('4 = 0 or > 1 (translated)', $plurals)); $this->assertTrue(in_array('5 = 0 or > 1 (translated)', $plurals)); $this->assertTrue(in_array('6 = 0 or > 1 (translated)', $plurals)); $this->assertTrue(in_array('7 = 0 or > 1 (translated)', $plurals)); $this->assertTrue(in_array('8 = 0 or > 1 (translated)', $plurals)); $this->assertTrue(in_array('9 = 0 or > 1 (translated)', $plurals)); $this->assertTrue(in_array('10 = 0 or > 1 (translated)', $plurals)); $this->assertTrue(in_array('11 = 0 or > 1 (translated)', $plurals)); $this->assertTrue(in_array('12 = 0 or > 1 (translated)', $plurals)); $this->assertTrue(in_array('13 = 0 or > 1 (translated)', $plurals)); $this->assertTrue(in_array('14 = 0 or > 1 (translated)', $plurals)); $this->assertTrue(in_array('15 = 0 or > 1 (translated)', $plurals)); $this->assertTrue(in_array('16 = 0 or > 1 (translated)', $plurals)); $this->assertTrue(in_array('17 = 0 or > 1 (translated)', $plurals)); $this->assertTrue(in_array('18 = 0 or > 1 (translated)', $plurals)); $this->assertTrue(in_array('19 = 0 or > 1 (translated)', $plurals)); $this->assertTrue(in_array('20 = 0 or > 1 (translated)', $plurals)); $this->assertTrue(in_array('21 = 0 or > 1 (translated)', $plurals)); $this->assertTrue(in_array('22 = 0 or > 1 (translated)', $plurals)); $this->assertTrue(in_array('23 = 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)); $coreSingular = $this->__singularFromCore(); $this->assertEqual('Plural Rule 1 (from core translated)', $coreSingular); $corePlurals = $this->__pluralFromCore(); $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('2 = 0 or > 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('3 = 0 or > 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('4 = 0 or > 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('5 = 0 or > 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('6 = 0 or > 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('7 = 0 or > 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('8 = 0 or > 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('9 = 0 or > 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('10 = 0 or > 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('11 = 0 or > 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('12 = 0 or > 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('13 = 0 or > 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('14 = 0 or > 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('15 = 0 or > 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('16 = 0 or > 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('17 = 0 or > 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('18 = 0 or > 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('19 = 0 or > 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('20 = 0 or > 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('21 = 0 or > 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('22 = 0 or > 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('23 = 0 or > 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('24 = 0 or > 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('25 = 0 or > 1 (from core translated)', $corePlurals)); }
testMoRulesOne method @access public @return void
testMoRulesOne
php
Datawalke/Coordino
cake/tests/cases/libs/i18n.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/i18n.test.php
MIT
function testPoRulesTwo() { Configure::write('Config.language', 'rule_2_po'); $singular = $this->__singular(); $this->assertEqual('Plural Rule 2 (translated)', $singular); $plurals = $this->__plural(); $this->assertTrue(in_array('0 = 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('3 > 1 (translated)', $plurals)); $this->assertTrue(in_array('4 > 1 (translated)', $plurals)); $this->assertTrue(in_array('5 > 1 (translated)', $plurals)); $this->assertTrue(in_array('6 > 1 (translated)', $plurals)); $this->assertTrue(in_array('7 > 1 (translated)', $plurals)); $this->assertTrue(in_array('8 > 1 (translated)', $plurals)); $this->assertTrue(in_array('9 > 1 (translated)', $plurals)); $this->assertTrue(in_array('10 > 1 (translated)', $plurals)); $this->assertTrue(in_array('11 > 1 (translated)', $plurals)); $this->assertTrue(in_array('12 > 1 (translated)', $plurals)); $this->assertTrue(in_array('13 > 1 (translated)', $plurals)); $this->assertTrue(in_array('14 > 1 (translated)', $plurals)); $this->assertTrue(in_array('15 > 1 (translated)', $plurals)); $this->assertTrue(in_array('16 > 1 (translated)', $plurals)); $this->assertTrue(in_array('17 > 1 (translated)', $plurals)); $this->assertTrue(in_array('18 > 1 (translated)', $plurals)); $this->assertTrue(in_array('19 > 1 (translated)', $plurals)); $this->assertTrue(in_array('20 > 1 (translated)', $plurals)); $this->assertTrue(in_array('21 > 1 (translated)', $plurals)); $this->assertTrue(in_array('22 > 1 (translated)', $plurals)); $this->assertTrue(in_array('23 > 1 (translated)', $plurals)); $this->assertTrue(in_array('24 > 1 (translated)', $plurals)); $this->assertTrue(in_array('25 > 1 (translated)', $plurals)); $coreSingular = $this->__singularFromCore(); $this->assertEqual('Plural Rule 2 (from core translated)', $coreSingular); $corePlurals = $this->__pluralFromCore(); $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('2 > 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('3 > 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('4 > 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('5 > 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('6 > 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('7 > 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('8 > 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('9 > 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('10 > 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('11 > 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('12 > 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('13 > 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('14 > 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('15 > 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('16 > 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('17 > 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('18 > 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('19 > 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('20 > 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('21 > 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('22 > 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('23 > 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('24 > 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('25 > 1 (from core translated)', $corePlurals)); }
testPoRulesTwo method @access public @return void
testPoRulesTwo
php
Datawalke/Coordino
cake/tests/cases/libs/i18n.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/i18n.test.php
MIT
function testMoRulesTwo() { Configure::write('Config.language', 'rule_2_mo'); $singular = $this->__singular(); $this->assertEqual('Plural Rule 2 (translated)', $singular); $plurals = $this->__plural(); $this->assertTrue(in_array('0 = 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('3 > 1 (translated)', $plurals)); $this->assertTrue(in_array('4 > 1 (translated)', $plurals)); $this->assertTrue(in_array('5 > 1 (translated)', $plurals)); $this->assertTrue(in_array('6 > 1 (translated)', $plurals)); $this->assertTrue(in_array('7 > 1 (translated)', $plurals)); $this->assertTrue(in_array('8 > 1 (translated)', $plurals)); $this->assertTrue(in_array('9 > 1 (translated)', $plurals)); $this->assertTrue(in_array('10 > 1 (translated)', $plurals)); $this->assertTrue(in_array('11 > 1 (translated)', $plurals)); $this->assertTrue(in_array('12 > 1 (translated)', $plurals)); $this->assertTrue(in_array('13 > 1 (translated)', $plurals)); $this->assertTrue(in_array('14 > 1 (translated)', $plurals)); $this->assertTrue(in_array('15 > 1 (translated)', $plurals)); $this->assertTrue(in_array('16 > 1 (translated)', $plurals)); $this->assertTrue(in_array('17 > 1 (translated)', $plurals)); $this->assertTrue(in_array('18 > 1 (translated)', $plurals)); $this->assertTrue(in_array('19 > 1 (translated)', $plurals)); $this->assertTrue(in_array('20 > 1 (translated)', $plurals)); $this->assertTrue(in_array('21 > 1 (translated)', $plurals)); $this->assertTrue(in_array('22 > 1 (translated)', $plurals)); $this->assertTrue(in_array('23 > 1 (translated)', $plurals)); $this->assertTrue(in_array('24 > 1 (translated)', $plurals)); $this->assertTrue(in_array('25 > 1 (translated)', $plurals)); $coreSingular = $this->__singularFromCore(); $this->assertEqual('Plural Rule 2 (from core translated)', $coreSingular); $corePlurals = $this->__pluralFromCore(); $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('2 > 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('3 > 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('4 > 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('5 > 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('6 > 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('7 > 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('8 > 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('9 > 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('10 > 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('11 > 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('12 > 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('13 > 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('14 > 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('15 > 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('16 > 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('17 > 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('18 > 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('19 > 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('20 > 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('21 > 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('22 > 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('23 > 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('24 > 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('25 > 1 (from core translated)', $corePlurals)); }
testMoRulesTwo method @access public @return void
testMoRulesTwo
php
Datawalke/Coordino
cake/tests/cases/libs/i18n.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/i18n.test.php
MIT
function testPoRulesThree() { Configure::write('Config.language', 'rule_3_po'); $singular = $this->__singular(); $this->assertEqual('Plural Rule 3 (translated)', $singular); $plurals = $this->__plural(); $this->assertTrue(in_array('0 = 0 (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('3 everything else (translated)', $plurals)); $this->assertTrue(in_array('4 everything else (translated)', $plurals)); $this->assertTrue(in_array('5 everything else (translated)', $plurals)); $this->assertTrue(in_array('6 everything else (translated)', $plurals)); $this->assertTrue(in_array('7 everything else (translated)', $plurals)); $this->assertTrue(in_array('8 everything else (translated)', $plurals)); $this->assertTrue(in_array('9 everything else (translated)', $plurals)); $this->assertTrue(in_array('10 everything else (translated)', $plurals)); $this->assertTrue(in_array('11 everything else (translated)', $plurals)); $this->assertTrue(in_array('12 everything else (translated)', $plurals)); $this->assertTrue(in_array('13 everything else (translated)', $plurals)); $this->assertTrue(in_array('14 everything else (translated)', $plurals)); $this->assertTrue(in_array('15 everything else (translated)', $plurals)); $this->assertTrue(in_array('16 everything else (translated)', $plurals)); $this->assertTrue(in_array('17 everything else (translated)', $plurals)); $this->assertTrue(in_array('18 everything else (translated)', $plurals)); $this->assertTrue(in_array('19 everything else (translated)', $plurals)); $this->assertTrue(in_array('20 everything else (translated)', $plurals)); $this->assertTrue(in_array('21 ends 1 but not 11 (translated)', $plurals)); $this->assertTrue(in_array('22 everything else (translated)', $plurals)); $this->assertTrue(in_array('23 everything else (translated)', $plurals)); $this->assertTrue(in_array('24 everything else (translated)', $plurals)); $this->assertTrue(in_array('25 everything else (translated)', $plurals)); $coreSingular = $this->__singularFromCore(); $this->assertEqual('Plural Rule 3 (from core translated)', $coreSingular); $corePlurals = $this->__pluralFromCore(); $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('2 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('3 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('4 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('5 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('6 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('7 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('8 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('9 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('10 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('11 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('12 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('13 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('14 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('15 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('16 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('17 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('18 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('19 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('20 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('21 ends 1 but not 11 (from core translated)', $corePlurals)); $this->assertTrue(in_array('22 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('23 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('24 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('25 everything else (from core translated)', $corePlurals)); }
testPoRulesThree method @access public @return void
testPoRulesThree
php
Datawalke/Coordino
cake/tests/cases/libs/i18n.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/i18n.test.php
MIT
function testMoRulesThree() { Configure::write('Config.language', 'rule_3_mo'); $singular = $this->__singular(); $this->assertEqual('Plural Rule 3 (translated)', $singular); $plurals = $this->__plural(); $this->assertTrue(in_array('0 = 0 (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('3 everything else (translated)', $plurals)); $this->assertTrue(in_array('4 everything else (translated)', $plurals)); $this->assertTrue(in_array('5 everything else (translated)', $plurals)); $this->assertTrue(in_array('6 everything else (translated)', $plurals)); $this->assertTrue(in_array('7 everything else (translated)', $plurals)); $this->assertTrue(in_array('8 everything else (translated)', $plurals)); $this->assertTrue(in_array('9 everything else (translated)', $plurals)); $this->assertTrue(in_array('10 everything else (translated)', $plurals)); $this->assertTrue(in_array('11 everything else (translated)', $plurals)); $this->assertTrue(in_array('12 everything else (translated)', $plurals)); $this->assertTrue(in_array('13 everything else (translated)', $plurals)); $this->assertTrue(in_array('14 everything else (translated)', $plurals)); $this->assertTrue(in_array('15 everything else (translated)', $plurals)); $this->assertTrue(in_array('16 everything else (translated)', $plurals)); $this->assertTrue(in_array('17 everything else (translated)', $plurals)); $this->assertTrue(in_array('18 everything else (translated)', $plurals)); $this->assertTrue(in_array('19 everything else (translated)', $plurals)); $this->assertTrue(in_array('20 everything else (translated)', $plurals)); $this->assertTrue(in_array('21 ends 1 but not 11 (translated)', $plurals)); $this->assertTrue(in_array('22 everything else (translated)', $plurals)); $this->assertTrue(in_array('23 everything else (translated)', $plurals)); $this->assertTrue(in_array('24 everything else (translated)', $plurals)); $this->assertTrue(in_array('25 everything else (translated)', $plurals)); $coreSingular = $this->__singularFromCore(); $this->assertEqual('Plural Rule 3 (from core translated)', $coreSingular); $corePlurals = $this->__pluralFromCore(); $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('2 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('3 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('4 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('5 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('6 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('7 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('8 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('9 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('10 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('11 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('12 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('13 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('14 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('15 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('16 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('17 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('18 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('19 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('20 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('21 ends 1 but not 11 (from core translated)', $corePlurals)); $this->assertTrue(in_array('22 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('23 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('24 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('25 everything else (from core translated)', $corePlurals)); }
testMoRulesThree method @access public @return void
testMoRulesThree
php
Datawalke/Coordino
cake/tests/cases/libs/i18n.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/i18n.test.php
MIT
function testPoRulesFour() { Configure::write('Config.language', 'rule_4_po'); $singular = $this->__singular(); $this->assertEqual('Plural Rule 4 (translated)', $singular); $plurals = $this->__plural(); $this->assertTrue(in_array('0 everything else (translated)', $plurals)); $this->assertTrue(in_array('1 = 1 (translated)', $plurals)); $this->assertTrue(in_array('2 = 2 (translated)', $plurals)); $this->assertTrue(in_array('3 everything else (translated)', $plurals)); $this->assertTrue(in_array('4 everything else (translated)', $plurals)); $this->assertTrue(in_array('5 everything else (translated)', $plurals)); $this->assertTrue(in_array('6 everything else (translated)', $plurals)); $this->assertTrue(in_array('7 everything else (translated)', $plurals)); $this->assertTrue(in_array('8 everything else (translated)', $plurals)); $this->assertTrue(in_array('9 everything else (translated)', $plurals)); $this->assertTrue(in_array('10 everything else (translated)', $plurals)); $this->assertTrue(in_array('11 everything else (translated)', $plurals)); $this->assertTrue(in_array('12 everything else (translated)', $plurals)); $this->assertTrue(in_array('13 everything else (translated)', $plurals)); $this->assertTrue(in_array('14 everything else (translated)', $plurals)); $this->assertTrue(in_array('15 everything else (translated)', $plurals)); $this->assertTrue(in_array('16 everything else (translated)', $plurals)); $this->assertTrue(in_array('17 everything else (translated)', $plurals)); $this->assertTrue(in_array('18 everything else (translated)', $plurals)); $this->assertTrue(in_array('19 everything else (translated)', $plurals)); $this->assertTrue(in_array('20 everything else (translated)', $plurals)); $this->assertTrue(in_array('21 everything else (translated)', $plurals)); $this->assertTrue(in_array('22 everything else (translated)', $plurals)); $this->assertTrue(in_array('23 everything else (translated)', $plurals)); $this->assertTrue(in_array('24 everything else (translated)', $plurals)); $this->assertTrue(in_array('25 everything else (translated)', $plurals)); $coreSingular = $this->__singularFromCore(); $this->assertEqual('Plural Rule 4 (from core translated)', $coreSingular); $corePlurals = $this->__pluralFromCore(); $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('2 = 2 (from core translated)', $corePlurals)); $this->assertTrue(in_array('3 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('4 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('5 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('6 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('7 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('8 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('9 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('10 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('11 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('12 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('13 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('14 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('15 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('16 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('17 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('18 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('19 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('20 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('21 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('22 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('23 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('24 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('25 everything else (from core translated)', $corePlurals)); }
testPoRulesFour method @access public @return void
testPoRulesFour
php
Datawalke/Coordino
cake/tests/cases/libs/i18n.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/i18n.test.php
MIT
function testMoRulesFour() { Configure::write('Config.language', 'rule_4_mo'); $singular = $this->__singular(); $this->assertEqual('Plural Rule 4 (translated)', $singular); $plurals = $this->__plural(); $this->assertTrue(in_array('0 everything else (translated)', $plurals)); $this->assertTrue(in_array('1 = 1 (translated)', $plurals)); $this->assertTrue(in_array('2 = 2 (translated)', $plurals)); $this->assertTrue(in_array('3 everything else (translated)', $plurals)); $this->assertTrue(in_array('4 everything else (translated)', $plurals)); $this->assertTrue(in_array('5 everything else (translated)', $plurals)); $this->assertTrue(in_array('6 everything else (translated)', $plurals)); $this->assertTrue(in_array('7 everything else (translated)', $plurals)); $this->assertTrue(in_array('8 everything else (translated)', $plurals)); $this->assertTrue(in_array('9 everything else (translated)', $plurals)); $this->assertTrue(in_array('10 everything else (translated)', $plurals)); $this->assertTrue(in_array('11 everything else (translated)', $plurals)); $this->assertTrue(in_array('12 everything else (translated)', $plurals)); $this->assertTrue(in_array('13 everything else (translated)', $plurals)); $this->assertTrue(in_array('14 everything else (translated)', $plurals)); $this->assertTrue(in_array('15 everything else (translated)', $plurals)); $this->assertTrue(in_array('16 everything else (translated)', $plurals)); $this->assertTrue(in_array('17 everything else (translated)', $plurals)); $this->assertTrue(in_array('18 everything else (translated)', $plurals)); $this->assertTrue(in_array('19 everything else (translated)', $plurals)); $this->assertTrue(in_array('20 everything else (translated)', $plurals)); $this->assertTrue(in_array('21 everything else (translated)', $plurals)); $this->assertTrue(in_array('22 everything else (translated)', $plurals)); $this->assertTrue(in_array('23 everything else (translated)', $plurals)); $this->assertTrue(in_array('24 everything else (translated)', $plurals)); $this->assertTrue(in_array('25 everything else (translated)', $plurals)); $coreSingular = $this->__singularFromCore(); $this->assertEqual('Plural Rule 4 (from core translated)', $coreSingular); $corePlurals = $this->__pluralFromCore(); $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('2 = 2 (from core translated)', $corePlurals)); $this->assertTrue(in_array('3 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('4 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('5 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('6 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('7 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('8 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('9 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('10 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('11 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('12 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('13 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('14 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('15 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('16 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('17 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('18 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('19 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('20 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('21 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('22 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('23 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('24 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('25 everything else (from core translated)', $corePlurals)); }
testMoRulesFour method @access public @return void
testMoRulesFour
php
Datawalke/Coordino
cake/tests/cases/libs/i18n.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/i18n.test.php
MIT
function testPoRulesFive() { Configure::write('Config.language', 'rule_5_po'); $singular = $this->__singular(); $this->assertEqual('Plural Rule 5 (translated)', $singular); $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('1 = 1 (translated)', $plurals)); $this->assertTrue(in_array('2 = 0 or ends in 01-19 (translated)', $plurals)); $this->assertTrue(in_array('3 = 0 or ends in 01-19 (translated)', $plurals)); $this->assertTrue(in_array('4 = 0 or ends in 01-19 (translated)', $plurals)); $this->assertTrue(in_array('5 = 0 or ends in 01-19 (translated)', $plurals)); $this->assertTrue(in_array('6 = 0 or ends in 01-19 (translated)', $plurals)); $this->assertTrue(in_array('7 = 0 or ends in 01-19 (translated)', $plurals)); $this->assertTrue(in_array('8 = 0 or ends in 01-19 (translated)', $plurals)); $this->assertTrue(in_array('9 = 0 or ends in 01-19 (translated)', $plurals)); $this->assertTrue(in_array('10 = 0 or ends in 01-19 (translated)', $plurals)); $this->assertTrue(in_array('11 = 0 or ends in 01-19 (translated)', $plurals)); $this->assertTrue(in_array('12 = 0 or ends in 01-19 (translated)', $plurals)); $this->assertTrue(in_array('13 = 0 or ends in 01-19 (translated)', $plurals)); $this->assertTrue(in_array('14 = 0 or ends in 01-19 (translated)', $plurals)); $this->assertTrue(in_array('15 = 0 or ends in 01-19 (translated)', $plurals)); $this->assertTrue(in_array('16 = 0 or ends in 01-19 (translated)', $plurals)); $this->assertTrue(in_array('17 = 0 or ends in 01-19 (translated)', $plurals)); $this->assertTrue(in_array('18 = 0 or ends in 01-19 (translated)', $plurals)); $this->assertTrue(in_array('19 = 0 or ends in 01-19 (translated)', $plurals)); $this->assertTrue(in_array('20 everything else (translated)', $plurals)); $this->assertTrue(in_array('21 everything else (translated)', $plurals)); $this->assertTrue(in_array('22 everything else (translated)', $plurals)); $this->assertTrue(in_array('23 everything else (translated)', $plurals)); $this->assertTrue(in_array('24 everything else (translated)', $plurals)); $this->assertTrue(in_array('25 everything else (translated)', $plurals)); $coreSingular = $this->__singularFromCore(); $this->assertEqual('Plural Rule 5 (from core translated)', $coreSingular); $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('1 = 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('2 = 0 or ends in 01-19 (from core translated)', $corePlurals)); $this->assertTrue(in_array('3 = 0 or ends in 01-19 (from core translated)', $corePlurals)); $this->assertTrue(in_array('4 = 0 or ends in 01-19 (from core translated)', $corePlurals)); $this->assertTrue(in_array('5 = 0 or ends in 01-19 (from core translated)', $corePlurals)); $this->assertTrue(in_array('6 = 0 or ends in 01-19 (from core translated)', $corePlurals)); $this->assertTrue(in_array('7 = 0 or ends in 01-19 (from core translated)', $corePlurals)); $this->assertTrue(in_array('8 = 0 or ends in 01-19 (from core translated)', $corePlurals)); $this->assertTrue(in_array('9 = 0 or ends in 01-19 (from core translated)', $corePlurals)); $this->assertTrue(in_array('10 = 0 or ends in 01-19 (from core translated)', $corePlurals)); $this->assertTrue(in_array('11 = 0 or ends in 01-19 (from core translated)', $corePlurals)); $this->assertTrue(in_array('12 = 0 or ends in 01-19 (from core translated)', $corePlurals)); $this->assertTrue(in_array('13 = 0 or ends in 01-19 (from core translated)', $corePlurals)); $this->assertTrue(in_array('14 = 0 or ends in 01-19 (from core translated)', $corePlurals)); $this->assertTrue(in_array('15 = 0 or ends in 01-19 (from core translated)', $corePlurals)); $this->assertTrue(in_array('16 = 0 or ends in 01-19 (from core translated)', $corePlurals)); $this->assertTrue(in_array('17 = 0 or ends in 01-19 (from core translated)', $corePlurals)); $this->assertTrue(in_array('18 = 0 or ends in 01-19 (from core translated)', $corePlurals)); $this->assertTrue(in_array('19 = 0 or ends in 01-19 (from core translated)', $corePlurals)); $this->assertTrue(in_array('20 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('21 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('22 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('23 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('24 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('25 everything else (from core translated)', $corePlurals)); }
testPoRulesFive method @access public @return void
testPoRulesFive
php
Datawalke/Coordino
cake/tests/cases/libs/i18n.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/i18n.test.php
MIT
function testMoRulesFive() { Configure::write('Config.language', 'rule_5_mo'); $singular = $this->__singular(); $this->assertEqual('Plural Rule 5 (translated)', $singular); $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('1 = 1 (translated)', $plurals)); $this->assertTrue(in_array('2 = 0 or ends in 01-19 (translated)', $plurals)); $this->assertTrue(in_array('3 = 0 or ends in 01-19 (translated)', $plurals)); $this->assertTrue(in_array('4 = 0 or ends in 01-19 (translated)', $plurals)); $this->assertTrue(in_array('5 = 0 or ends in 01-19 (translated)', $plurals)); $this->assertTrue(in_array('6 = 0 or ends in 01-19 (translated)', $plurals)); $this->assertTrue(in_array('7 = 0 or ends in 01-19 (translated)', $plurals)); $this->assertTrue(in_array('8 = 0 or ends in 01-19 (translated)', $plurals)); $this->assertTrue(in_array('9 = 0 or ends in 01-19 (translated)', $plurals)); $this->assertTrue(in_array('10 = 0 or ends in 01-19 (translated)', $plurals)); $this->assertTrue(in_array('11 = 0 or ends in 01-19 (translated)', $plurals)); $this->assertTrue(in_array('12 = 0 or ends in 01-19 (translated)', $plurals)); $this->assertTrue(in_array('13 = 0 or ends in 01-19 (translated)', $plurals)); $this->assertTrue(in_array('14 = 0 or ends in 01-19 (translated)', $plurals)); $this->assertTrue(in_array('15 = 0 or ends in 01-19 (translated)', $plurals)); $this->assertTrue(in_array('16 = 0 or ends in 01-19 (translated)', $plurals)); $this->assertTrue(in_array('17 = 0 or ends in 01-19 (translated)', $plurals)); $this->assertTrue(in_array('18 = 0 or ends in 01-19 (translated)', $plurals)); $this->assertTrue(in_array('19 = 0 or ends in 01-19 (translated)', $plurals)); $this->assertTrue(in_array('20 everything else (translated)', $plurals)); $this->assertTrue(in_array('21 everything else (translated)', $plurals)); $this->assertTrue(in_array('22 everything else (translated)', $plurals)); $this->assertTrue(in_array('23 everything else (translated)', $plurals)); $this->assertTrue(in_array('24 everything else (translated)', $plurals)); $this->assertTrue(in_array('25 everything else (translated)', $plurals)); $coreSingular = $this->__singularFromCore(); $this->assertEqual('Plural Rule 5 (from core translated)', $coreSingular); $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('1 = 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('2 = 0 or ends in 01-19 (from core translated)', $corePlurals)); $this->assertTrue(in_array('3 = 0 or ends in 01-19 (from core translated)', $corePlurals)); $this->assertTrue(in_array('4 = 0 or ends in 01-19 (from core translated)', $corePlurals)); $this->assertTrue(in_array('5 = 0 or ends in 01-19 (from core translated)', $corePlurals)); $this->assertTrue(in_array('6 = 0 or ends in 01-19 (from core translated)', $corePlurals)); $this->assertTrue(in_array('7 = 0 or ends in 01-19 (from core translated)', $corePlurals)); $this->assertTrue(in_array('8 = 0 or ends in 01-19 (from core translated)', $corePlurals)); $this->assertTrue(in_array('9 = 0 or ends in 01-19 (from core translated)', $corePlurals)); $this->assertTrue(in_array('10 = 0 or ends in 01-19 (from core translated)', $corePlurals)); $this->assertTrue(in_array('11 = 0 or ends in 01-19 (from core translated)', $corePlurals)); $this->assertTrue(in_array('12 = 0 or ends in 01-19 (from core translated)', $corePlurals)); $this->assertTrue(in_array('13 = 0 or ends in 01-19 (from core translated)', $corePlurals)); $this->assertTrue(in_array('14 = 0 or ends in 01-19 (from core translated)', $corePlurals)); $this->assertTrue(in_array('15 = 0 or ends in 01-19 (from core translated)', $corePlurals)); $this->assertTrue(in_array('16 = 0 or ends in 01-19 (from core translated)', $corePlurals)); $this->assertTrue(in_array('17 = 0 or ends in 01-19 (from core translated)', $corePlurals)); $this->assertTrue(in_array('18 = 0 or ends in 01-19 (from core translated)', $corePlurals)); $this->assertTrue(in_array('19 = 0 or ends in 01-19 (from core translated)', $corePlurals)); $this->assertTrue(in_array('20 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('21 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('22 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('23 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('24 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('25 everything else (from core translated)', $corePlurals)); }
testMoRulesFive method @access public @return void
testMoRulesFive
php
Datawalke/Coordino
cake/tests/cases/libs/i18n.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/i18n.test.php
MIT
function testPoRulesSix() { Configure::write('Config.language', 'rule_6_po'); $singular = $this->__singular(); $this->assertEqual('Plural Rule 6 (translated)', $singular); $plurals = $this->__plural(); $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('2 everything else (translated)', $plurals)); $this->assertTrue(in_array('3 everything else (translated)', $plurals)); $this->assertTrue(in_array('4 everything else (translated)', $plurals)); $this->assertTrue(in_array('5 everything else (translated)', $plurals)); $this->assertTrue(in_array('6 everything else (translated)', $plurals)); $this->assertTrue(in_array('7 everything else (translated)', $plurals)); $this->assertTrue(in_array('8 everything else (translated)', $plurals)); $this->assertTrue(in_array('9 everything else (translated)', $plurals)); $this->assertTrue(in_array('10 ends in 0 or ends in 10-20 (translated)', $plurals)); $this->assertTrue(in_array('11 ends in 0 or ends in 10-20 (translated)', $plurals)); $this->assertTrue(in_array('12 ends in 0 or ends in 10-20 (translated)', $plurals)); $this->assertTrue(in_array('13 ends in 0 or ends in 10-20 (translated)', $plurals)); $this->assertTrue(in_array('14 ends in 0 or ends in 10-20 (translated)', $plurals)); $this->assertTrue(in_array('15 ends in 0 or ends in 10-20 (translated)', $plurals)); $this->assertTrue(in_array('16 ends in 0 or ends in 10-20 (translated)', $plurals)); $this->assertTrue(in_array('17 ends in 0 or ends in 10-20 (translated)', $plurals)); $this->assertTrue(in_array('18 ends in 0 or ends in 10-20 (translated)', $plurals)); $this->assertTrue(in_array('19 ends in 0 or ends in 10-20 (translated)', $plurals)); $this->assertTrue(in_array('20 ends in 0 or ends in 10-20 (translated)', $plurals)); $this->assertTrue(in_array('21 ends in 1, not 11 (translated)', $plurals)); $this->assertTrue(in_array('22 everything else (translated)', $plurals)); $this->assertTrue(in_array('23 everything else (translated)', $plurals)); $this->assertTrue(in_array('24 everything else (translated)', $plurals)); $this->assertTrue(in_array('25 everything else (translated)', $plurals)); $coreSingular = $this->__singularFromCore(); $this->assertEqual('Plural Rule 6 (from core translated)', $coreSingular); $corePlurals = $this->__pluralFromCore(); $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('2 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('3 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('4 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('5 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('6 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('7 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('8 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('9 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('10 ends in 0 or ends in 10-20 (from core translated)', $corePlurals)); $this->assertTrue(in_array('11 ends in 0 or ends in 10-20 (from core translated)', $corePlurals)); $this->assertTrue(in_array('12 ends in 0 or ends in 10-20 (from core translated)', $corePlurals)); $this->assertTrue(in_array('13 ends in 0 or ends in 10-20 (from core translated)', $corePlurals)); $this->assertTrue(in_array('14 ends in 0 or ends in 10-20 (from core translated)', $corePlurals)); $this->assertTrue(in_array('15 ends in 0 or ends in 10-20 (from core translated)', $corePlurals)); $this->assertTrue(in_array('16 ends in 0 or ends in 10-20 (from core translated)', $corePlurals)); $this->assertTrue(in_array('17 ends in 0 or ends in 10-20 (from core translated)', $corePlurals)); $this->assertTrue(in_array('18 ends in 0 or ends in 10-20 (from core translated)', $corePlurals)); $this->assertTrue(in_array('19 ends in 0 or ends in 10-20 (from core translated)', $corePlurals)); $this->assertTrue(in_array('20 ends in 0 or ends in 10-20 (from core translated)', $corePlurals)); $this->assertTrue(in_array('21 ends in 1, not 11 (from core translated)', $corePlurals)); $this->assertTrue(in_array('22 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('23 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('24 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('25 everything else (from core translated)', $corePlurals)); }
testPoRulesSix method @access public @return void
testPoRulesSix
php
Datawalke/Coordino
cake/tests/cases/libs/i18n.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/i18n.test.php
MIT
function testMoRulesSix() { Configure::write('Config.language', 'rule_6_mo'); $singular = $this->__singular(); $this->assertEqual('Plural Rule 6 (translated)', $singular); $plurals = $this->__plural(); $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('2 everything else (translated)', $plurals)); $this->assertTrue(in_array('3 everything else (translated)', $plurals)); $this->assertTrue(in_array('4 everything else (translated)', $plurals)); $this->assertTrue(in_array('5 everything else (translated)', $plurals)); $this->assertTrue(in_array('6 everything else (translated)', $plurals)); $this->assertTrue(in_array('7 everything else (translated)', $plurals)); $this->assertTrue(in_array('8 everything else (translated)', $plurals)); $this->assertTrue(in_array('9 everything else (translated)', $plurals)); $this->assertTrue(in_array('10 ends in 0 or ends in 10-20 (translated)', $plurals)); $this->assertTrue(in_array('11 ends in 0 or ends in 10-20 (translated)', $plurals)); $this->assertTrue(in_array('12 ends in 0 or ends in 10-20 (translated)', $plurals)); $this->assertTrue(in_array('13 ends in 0 or ends in 10-20 (translated)', $plurals)); $this->assertTrue(in_array('14 ends in 0 or ends in 10-20 (translated)', $plurals)); $this->assertTrue(in_array('15 ends in 0 or ends in 10-20 (translated)', $plurals)); $this->assertTrue(in_array('16 ends in 0 or ends in 10-20 (translated)', $plurals)); $this->assertTrue(in_array('17 ends in 0 or ends in 10-20 (translated)', $plurals)); $this->assertTrue(in_array('18 ends in 0 or ends in 10-20 (translated)', $plurals)); $this->assertTrue(in_array('19 ends in 0 or ends in 10-20 (translated)', $plurals)); $this->assertTrue(in_array('20 ends in 0 or ends in 10-20 (translated)', $plurals)); $this->assertTrue(in_array('21 ends in 1, not 11 (translated)', $plurals)); $this->assertTrue(in_array('22 everything else (translated)', $plurals)); $this->assertTrue(in_array('23 everything else (translated)', $plurals)); $this->assertTrue(in_array('24 everything else (translated)', $plurals)); $this->assertTrue(in_array('25 everything else (translated)', $plurals)); $coreSingular = $this->__singularFromCore(); $this->assertEqual('Plural Rule 6 (from core translated)', $coreSingular); $corePlurals = $this->__pluralFromCore(); $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('2 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('3 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('4 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('5 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('6 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('7 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('8 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('9 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('10 ends in 0 or ends in 10-20 (from core translated)', $corePlurals)); $this->assertTrue(in_array('11 ends in 0 or ends in 10-20 (from core translated)', $corePlurals)); $this->assertTrue(in_array('12 ends in 0 or ends in 10-20 (from core translated)', $corePlurals)); $this->assertTrue(in_array('13 ends in 0 or ends in 10-20 (from core translated)', $corePlurals)); $this->assertTrue(in_array('14 ends in 0 or ends in 10-20 (from core translated)', $corePlurals)); $this->assertTrue(in_array('15 ends in 0 or ends in 10-20 (from core translated)', $corePlurals)); $this->assertTrue(in_array('16 ends in 0 or ends in 10-20 (from core translated)', $corePlurals)); $this->assertTrue(in_array('17 ends in 0 or ends in 10-20 (from core translated)', $corePlurals)); $this->assertTrue(in_array('18 ends in 0 or ends in 10-20 (from core translated)', $corePlurals)); $this->assertTrue(in_array('19 ends in 0 or ends in 10-20 (from core translated)', $corePlurals)); $this->assertTrue(in_array('20 ends in 0 or ends in 10-20 (from core translated)', $corePlurals)); $this->assertTrue(in_array('21 ends in 1, not 11 (from core translated)', $corePlurals)); $this->assertTrue(in_array('22 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('23 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('24 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('25 everything else (from core translated)', $corePlurals)); }
testMoRulesSix method @access public @return void
testMoRulesSix
php
Datawalke/Coordino
cake/tests/cases/libs/i18n.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/i18n.test.php
MIT
function testPoRulesSeven() { Configure::write('Config.language', 'rule_7_po'); $singular = $this->__singular(); $this->assertEqual('Plural Rule 7 (translated)', $singular); $plurals = $this->__plural(); $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('2 ends in 2-4, not 12-14 (translated)', $plurals)); $this->assertTrue(in_array('3 ends in 2-4, not 12-14 (translated)', $plurals)); $this->assertTrue(in_array('4 ends in 2-4, not 12-14 (translated)', $plurals)); $this->assertTrue(in_array('5 everything else (translated)', $plurals)); $this->assertTrue(in_array('6 everything else (translated)', $plurals)); $this->assertTrue(in_array('7 everything else (translated)', $plurals)); $this->assertTrue(in_array('8 everything else (translated)', $plurals)); $this->assertTrue(in_array('9 everything else (translated)', $plurals)); $this->assertTrue(in_array('10 everything else (translated)', $plurals)); $this->assertTrue(in_array('11 everything else (translated)', $plurals)); $this->assertTrue(in_array('12 everything else (translated)', $plurals)); $this->assertTrue(in_array('13 everything else (translated)', $plurals)); $this->assertTrue(in_array('14 everything else (translated)', $plurals)); $this->assertTrue(in_array('15 everything else (translated)', $plurals)); $this->assertTrue(in_array('16 everything else (translated)', $plurals)); $this->assertTrue(in_array('17 everything else (translated)', $plurals)); $this->assertTrue(in_array('18 everything else (translated)', $plurals)); $this->assertTrue(in_array('19 everything else (translated)', $plurals)); $this->assertTrue(in_array('20 everything else (translated)', $plurals)); $this->assertTrue(in_array('21 ends in 1, not 11 (translated)', $plurals)); $this->assertTrue(in_array('22 ends in 2-4, not 12-14 (translated)', $plurals)); $this->assertTrue(in_array('23 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)); $coreSingular = $this->__singularFromCore(); $this->assertEqual('Plural Rule 7 (from core translated)', $coreSingular); $corePlurals = $this->__pluralFromCore(); $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('2 ends in 2-4, not 12-14 (from core translated)', $corePlurals)); $this->assertTrue(in_array('3 ends in 2-4, not 12-14 (from core translated)', $corePlurals)); $this->assertTrue(in_array('4 ends in 2-4, not 12-14 (from core translated)', $corePlurals)); $this->assertTrue(in_array('5 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('6 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('7 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('8 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('9 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('10 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('11 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('12 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('13 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('14 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('15 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('16 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('17 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('18 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('19 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('20 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('21 ends in 1, not 11 (from core translated)', $corePlurals)); $this->assertTrue(in_array('22 ends in 2-4, not 12-14 (from core translated)', $corePlurals)); $this->assertTrue(in_array('23 ends in 2-4, not 12-14 (from core translated)', $corePlurals)); $this->assertTrue(in_array('24 ends in 2-4, not 12-14 (from core translated)', $corePlurals)); $this->assertTrue(in_array('25 everything else (from core translated)', $corePlurals)); }
testPoRulesSeven method @access public @return void
testPoRulesSeven
php
Datawalke/Coordino
cake/tests/cases/libs/i18n.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/i18n.test.php
MIT
function testMoRulesSeven() { Configure::write('Config.language', 'rule_7_mo'); $singular = $this->__singular(); $this->assertEqual('Plural Rule 7 (translated)', $singular); $plurals = $this->__plural(); $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('2 ends in 2-4, not 12-14 (translated)', $plurals)); $this->assertTrue(in_array('3 ends in 2-4, not 12-14 (translated)', $plurals)); $this->assertTrue(in_array('4 ends in 2-4, not 12-14 (translated)', $plurals)); $this->assertTrue(in_array('5 everything else (translated)', $plurals)); $this->assertTrue(in_array('6 everything else (translated)', $plurals)); $this->assertTrue(in_array('7 everything else (translated)', $plurals)); $this->assertTrue(in_array('8 everything else (translated)', $plurals)); $this->assertTrue(in_array('9 everything else (translated)', $plurals)); $this->assertTrue(in_array('10 everything else (translated)', $plurals)); $this->assertTrue(in_array('11 everything else (translated)', $plurals)); $this->assertTrue(in_array('12 everything else (translated)', $plurals)); $this->assertTrue(in_array('13 everything else (translated)', $plurals)); $this->assertTrue(in_array('14 everything else (translated)', $plurals)); $this->assertTrue(in_array('15 everything else (translated)', $plurals)); $this->assertTrue(in_array('16 everything else (translated)', $plurals)); $this->assertTrue(in_array('17 everything else (translated)', $plurals)); $this->assertTrue(in_array('18 everything else (translated)', $plurals)); $this->assertTrue(in_array('19 everything else (translated)', $plurals)); $this->assertTrue(in_array('20 everything else (translated)', $plurals)); $this->assertTrue(in_array('21 ends in 1, not 11 (translated)', $plurals)); $this->assertTrue(in_array('22 ends in 2-4, not 12-14 (translated)', $plurals)); $this->assertTrue(in_array('23 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)); $coreSingular = $this->__singularFromCore(); $this->assertEqual('Plural Rule 7 (from core translated)', $coreSingular); $corePlurals = $this->__pluralFromCore(); $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('2 ends in 2-4, not 12-14 (from core translated)', $corePlurals)); $this->assertTrue(in_array('3 ends in 2-4, not 12-14 (from core translated)', $corePlurals)); $this->assertTrue(in_array('4 ends in 2-4, not 12-14 (from core translated)', $corePlurals)); $this->assertTrue(in_array('5 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('6 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('7 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('8 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('9 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('10 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('11 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('12 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('13 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('14 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('15 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('16 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('17 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('18 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('19 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('20 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('21 ends in 1, not 11 (from core translated)', $corePlurals)); $this->assertTrue(in_array('22 ends in 2-4, not 12-14 (from core translated)', $corePlurals)); $this->assertTrue(in_array('23 ends in 2-4, not 12-14 (from core translated)', $corePlurals)); $this->assertTrue(in_array('24 ends in 2-4, not 12-14 (from core translated)', $corePlurals)); $this->assertTrue(in_array('25 everything else (from core translated)', $corePlurals)); }
testMoRulesSeven method @access public @return void
testMoRulesSeven
php
Datawalke/Coordino
cake/tests/cases/libs/i18n.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/i18n.test.php
MIT
function testPoRulesEight() { Configure::write('Config.language', 'rule_8_po'); $singular = $this->__singular(); $this->assertEqual('Plural Rule 8 (translated)', $singular); $plurals = $this->__plural(); $this->assertTrue(in_array('0 everything else (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('3 is 2-4 (translated)', $plurals)); $this->assertTrue(in_array('4 is 2-4 (translated)', $plurals)); $this->assertTrue(in_array('5 everything else (translated)', $plurals)); $this->assertTrue(in_array('6 everything else (translated)', $plurals)); $this->assertTrue(in_array('7 everything else (translated)', $plurals)); $this->assertTrue(in_array('8 everything else (translated)', $plurals)); $this->assertTrue(in_array('9 everything else (translated)', $plurals)); $this->assertTrue(in_array('10 everything else (translated)', $plurals)); $this->assertTrue(in_array('11 everything else (translated)', $plurals)); $this->assertTrue(in_array('12 everything else (translated)', $plurals)); $this->assertTrue(in_array('13 everything else (translated)', $plurals)); $this->assertTrue(in_array('14 everything else (translated)', $plurals)); $this->assertTrue(in_array('15 everything else (translated)', $plurals)); $this->assertTrue(in_array('16 everything else (translated)', $plurals)); $this->assertTrue(in_array('17 everything else (translated)', $plurals)); $this->assertTrue(in_array('18 everything else (translated)', $plurals)); $this->assertTrue(in_array('19 everything else (translated)', $plurals)); $this->assertTrue(in_array('20 everything else (translated)', $plurals)); $this->assertTrue(in_array('21 everything else (translated)', $plurals)); $this->assertTrue(in_array('22 everything else (translated)', $plurals)); $this->assertTrue(in_array('23 everything else (translated)', $plurals)); $this->assertTrue(in_array('24 everything else (translated)', $plurals)); $this->assertTrue(in_array('25 everything else (translated)', $plurals)); $coreSingular = $this->__singularFromCore(); $this->assertEqual('Plural Rule 8 (from core translated)', $coreSingular); $corePlurals = $this->__pluralFromCore(); $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('2 is 2-4 (from core translated)', $corePlurals)); $this->assertTrue(in_array('3 is 2-4 (from core translated)', $corePlurals)); $this->assertTrue(in_array('4 is 2-4 (from core translated)', $corePlurals)); $this->assertTrue(in_array('5 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('6 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('7 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('8 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('9 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('10 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('11 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('12 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('13 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('14 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('15 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('16 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('17 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('18 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('19 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('20 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('21 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('22 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('23 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('24 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('25 everything else (from core translated)', $corePlurals)); }
testPoRulesEight method @access public @return void
testPoRulesEight
php
Datawalke/Coordino
cake/tests/cases/libs/i18n.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/i18n.test.php
MIT
function testMoRulesEight() { Configure::write('Config.language', 'rule_8_mo'); $singular = $this->__singular(); $this->assertEqual('Plural Rule 8 (translated)', $singular); $plurals = $this->__plural(); $this->assertTrue(in_array('0 everything else (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('3 is 2-4 (translated)', $plurals)); $this->assertTrue(in_array('4 is 2-4 (translated)', $plurals)); $this->assertTrue(in_array('5 everything else (translated)', $plurals)); $this->assertTrue(in_array('6 everything else (translated)', $plurals)); $this->assertTrue(in_array('7 everything else (translated)', $plurals)); $this->assertTrue(in_array('8 everything else (translated)', $plurals)); $this->assertTrue(in_array('9 everything else (translated)', $plurals)); $this->assertTrue(in_array('10 everything else (translated)', $plurals)); $this->assertTrue(in_array('11 everything else (translated)', $plurals)); $this->assertTrue(in_array('12 everything else (translated)', $plurals)); $this->assertTrue(in_array('13 everything else (translated)', $plurals)); $this->assertTrue(in_array('14 everything else (translated)', $plurals)); $this->assertTrue(in_array('15 everything else (translated)', $plurals)); $this->assertTrue(in_array('16 everything else (translated)', $plurals)); $this->assertTrue(in_array('17 everything else (translated)', $plurals)); $this->assertTrue(in_array('18 everything else (translated)', $plurals)); $this->assertTrue(in_array('19 everything else (translated)', $plurals)); $this->assertTrue(in_array('20 everything else (translated)', $plurals)); $this->assertTrue(in_array('21 everything else (translated)', $plurals)); $this->assertTrue(in_array('22 everything else (translated)', $plurals)); $this->assertTrue(in_array('23 everything else (translated)', $plurals)); $this->assertTrue(in_array('24 everything else (translated)', $plurals)); $this->assertTrue(in_array('25 everything else (translated)', $plurals)); $coreSingular = $this->__singularFromCore(); $this->assertEqual('Plural Rule 8 (from core translated)', $coreSingular); $corePlurals = $this->__pluralFromCore(); $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('2 is 2-4 (from core translated)', $corePlurals)); $this->assertTrue(in_array('3 is 2-4 (from core translated)', $corePlurals)); $this->assertTrue(in_array('4 is 2-4 (from core translated)', $corePlurals)); $this->assertTrue(in_array('5 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('6 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('7 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('8 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('9 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('10 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('11 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('12 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('13 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('14 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('15 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('16 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('17 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('18 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('19 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('20 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('21 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('22 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('23 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('24 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('25 everything else (from core translated)', $corePlurals)); }
testMoRulesEight method @access public @return void
testMoRulesEight
php
Datawalke/Coordino
cake/tests/cases/libs/i18n.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/i18n.test.php
MIT
function testPoRulesNine() { Configure::write('Config.language', 'rule_9_po'); $singular = $this->__singular(); $this->assertEqual('Plural Rule 9 (translated)', $singular); $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('2 ends in 2-4, not 12-14 (translated)', $plurals)); $this->assertTrue(in_array('3 ends in 2-4, not 12-14 (translated)', $plurals)); $this->assertTrue(in_array('4 ends in 2-4, not 12-14 (translated)', $plurals)); $this->assertTrue(in_array('5 everything else (translated)', $plurals)); $this->assertTrue(in_array('6 everything else (translated)', $plurals)); $this->assertTrue(in_array('7 everything else (translated)', $plurals)); $this->assertTrue(in_array('8 everything else (translated)', $plurals)); $this->assertTrue(in_array('9 everything else (translated)', $plurals)); $this->assertTrue(in_array('10 everything else (translated)', $plurals)); $this->assertTrue(in_array('11 everything else (translated)', $plurals)); $this->assertTrue(in_array('12 everything else (translated)', $plurals)); $this->assertTrue(in_array('13 everything else (translated)', $plurals)); $this->assertTrue(in_array('14 everything else (translated)', $plurals)); $this->assertTrue(in_array('15 everything else (translated)', $plurals)); $this->assertTrue(in_array('16 everything else (translated)', $plurals)); $this->assertTrue(in_array('17 everything else (translated)', $plurals)); $this->assertTrue(in_array('18 everything else (translated)', $plurals)); $this->assertTrue(in_array('19 everything else (translated)', $plurals)); $this->assertTrue(in_array('20 everything else (translated)', $plurals)); $this->assertTrue(in_array('21 everything else (translated)', $plurals)); $this->assertTrue(in_array('22 ends in 2-4, not 12-14 (translated)', $plurals)); $this->assertTrue(in_array('23 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)); $coreSingular = $this->__singularFromCore(); $this->assertEqual('Plural Rule 9 (from core translated)', $coreSingular); $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('1 is 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('2 ends in 2-4, not 12-14 (from core translated)', $corePlurals)); $this->assertTrue(in_array('3 ends in 2-4, not 12-14 (from core translated)', $corePlurals)); $this->assertTrue(in_array('4 ends in 2-4, not 12-14 (from core translated)', $corePlurals)); $this->assertTrue(in_array('5 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('6 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('7 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('8 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('9 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('10 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('11 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('12 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('13 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('14 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('15 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('16 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('17 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('18 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('19 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('20 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('21 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('22 ends in 2-4, not 12-14 (from core translated)', $corePlurals)); $this->assertTrue(in_array('23 ends in 2-4, not 12-14 (from core translated)', $corePlurals)); $this->assertTrue(in_array('24 ends in 2-4, not 12-14 (from core translated)', $corePlurals)); $this->assertTrue(in_array('25 everything else (from core translated)', $corePlurals)); }
testPoRulesNine method @access public @return void
testPoRulesNine
php
Datawalke/Coordino
cake/tests/cases/libs/i18n.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/i18n.test.php
MIT
function testMoRulesNine() { Configure::write('Config.language', 'rule_9_po'); $singular = $this->__singular(); $this->assertEqual('Plural Rule 9 (translated)', $singular); $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('2 ends in 2-4, not 12-14 (translated)', $plurals)); $this->assertTrue(in_array('3 ends in 2-4, not 12-14 (translated)', $plurals)); $this->assertTrue(in_array('4 ends in 2-4, not 12-14 (translated)', $plurals)); $this->assertTrue(in_array('5 everything else (translated)', $plurals)); $this->assertTrue(in_array('6 everything else (translated)', $plurals)); $this->assertTrue(in_array('7 everything else (translated)', $plurals)); $this->assertTrue(in_array('8 everything else (translated)', $plurals)); $this->assertTrue(in_array('9 everything else (translated)', $plurals)); $this->assertTrue(in_array('10 everything else (translated)', $plurals)); $this->assertTrue(in_array('11 everything else (translated)', $plurals)); $this->assertTrue(in_array('12 everything else (translated)', $plurals)); $this->assertTrue(in_array('13 everything else (translated)', $plurals)); $this->assertTrue(in_array('14 everything else (translated)', $plurals)); $this->assertTrue(in_array('15 everything else (translated)', $plurals)); $this->assertTrue(in_array('16 everything else (translated)', $plurals)); $this->assertTrue(in_array('17 everything else (translated)', $plurals)); $this->assertTrue(in_array('18 everything else (translated)', $plurals)); $this->assertTrue(in_array('19 everything else (translated)', $plurals)); $this->assertTrue(in_array('20 everything else (translated)', $plurals)); $this->assertTrue(in_array('21 everything else (translated)', $plurals)); $this->assertTrue(in_array('22 ends in 2-4, not 12-14 (translated)', $plurals)); $this->assertTrue(in_array('23 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)); $coreSingular = $this->__singularFromCore(); $this->assertEqual('Plural Rule 9 (from core translated)', $coreSingular); $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('1 is 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('2 ends in 2-4, not 12-14 (from core translated)', $corePlurals)); $this->assertTrue(in_array('3 ends in 2-4, not 12-14 (from core translated)', $corePlurals)); $this->assertTrue(in_array('4 ends in 2-4, not 12-14 (from core translated)', $corePlurals)); $this->assertTrue(in_array('5 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('6 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('7 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('8 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('9 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('10 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('11 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('12 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('13 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('14 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('15 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('16 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('17 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('18 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('19 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('20 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('21 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('22 ends in 2-4, not 12-14 (from core translated)', $corePlurals)); $this->assertTrue(in_array('23 ends in 2-4, not 12-14 (from core translated)', $corePlurals)); $this->assertTrue(in_array('24 ends in 2-4, not 12-14 (from core translated)', $corePlurals)); $this->assertTrue(in_array('25 everything else (from core translated)', $corePlurals)); }
testMoRulesNine method @access public @return void
testMoRulesNine
php
Datawalke/Coordino
cake/tests/cases/libs/i18n.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/i18n.test.php
MIT
function testPoRulesTen() { Configure::write('Config.language', 'rule_10_po'); $singular = $this->__singular(); $this->assertEqual('Plural Rule 10 (translated)', $singular); $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('2 ends in 2 (translated)', $plurals)); $this->assertTrue(in_array('3 ends in 03-04 (translated)', $plurals)); $this->assertTrue(in_array('4 ends in 03-04 (translated)', $plurals)); $this->assertTrue(in_array('5 everything else (translated)', $plurals)); $this->assertTrue(in_array('6 everything else (translated)', $plurals)); $this->assertTrue(in_array('7 everything else (translated)', $plurals)); $this->assertTrue(in_array('8 everything else (translated)', $plurals)); $this->assertTrue(in_array('9 everything else (translated)', $plurals)); $this->assertTrue(in_array('10 everything else (translated)', $plurals)); $this->assertTrue(in_array('11 everything else (translated)', $plurals)); $this->assertTrue(in_array('12 everything else (translated)', $plurals)); $this->assertTrue(in_array('13 everything else (translated)', $plurals)); $this->assertTrue(in_array('14 everything else (translated)', $plurals)); $this->assertTrue(in_array('15 everything else (translated)', $plurals)); $this->assertTrue(in_array('16 everything else (translated)', $plurals)); $this->assertTrue(in_array('17 everything else (translated)', $plurals)); $this->assertTrue(in_array('18 everything else (translated)', $plurals)); $this->assertTrue(in_array('19 everything else (translated)', $plurals)); $this->assertTrue(in_array('20 everything else (translated)', $plurals)); $this->assertTrue(in_array('21 everything else (translated)', $plurals)); $this->assertTrue(in_array('22 everything else (translated)', $plurals)); $this->assertTrue(in_array('23 everything else (translated)', $plurals)); $this->assertTrue(in_array('24 everything else (translated)', $plurals)); $this->assertTrue(in_array('25 everything else (translated)', $plurals)); $coreSingular = $this->__singularFromCore(); $this->assertEqual('Plural Rule 10 (from core translated)', $coreSingular); $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('2 ends in 2 (from core translated)', $corePlurals)); $this->assertTrue(in_array('3 ends in 03-04 (from core translated)', $corePlurals)); $this->assertTrue(in_array('4 ends in 03-04 (from core translated)', $corePlurals)); $this->assertTrue(in_array('5 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('6 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('7 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('8 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('9 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('10 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('11 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('12 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('13 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('14 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('15 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('16 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('17 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('18 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('19 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('20 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('21 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('22 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('23 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('24 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('25 everything else (from core translated)', $corePlurals)); }
testPoRulesTen method @access public @return void
testPoRulesTen
php
Datawalke/Coordino
cake/tests/cases/libs/i18n.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/i18n.test.php
MIT
function testMoRulesTen() { Configure::write('Config.language', 'rule_10_mo'); $singular = $this->__singular(); $this->assertEqual('Plural Rule 10 (translated)', $singular); $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('2 ends in 2 (translated)', $plurals)); $this->assertTrue(in_array('3 ends in 03-04 (translated)', $plurals)); $this->assertTrue(in_array('4 ends in 03-04 (translated)', $plurals)); $this->assertTrue(in_array('5 everything else (translated)', $plurals)); $this->assertTrue(in_array('6 everything else (translated)', $plurals)); $this->assertTrue(in_array('7 everything else (translated)', $plurals)); $this->assertTrue(in_array('8 everything else (translated)', $plurals)); $this->assertTrue(in_array('9 everything else (translated)', $plurals)); $this->assertTrue(in_array('10 everything else (translated)', $plurals)); $this->assertTrue(in_array('11 everything else (translated)', $plurals)); $this->assertTrue(in_array('12 everything else (translated)', $plurals)); $this->assertTrue(in_array('13 everything else (translated)', $plurals)); $this->assertTrue(in_array('14 everything else (translated)', $plurals)); $this->assertTrue(in_array('15 everything else (translated)', $plurals)); $this->assertTrue(in_array('16 everything else (translated)', $plurals)); $this->assertTrue(in_array('17 everything else (translated)', $plurals)); $this->assertTrue(in_array('18 everything else (translated)', $plurals)); $this->assertTrue(in_array('19 everything else (translated)', $plurals)); $this->assertTrue(in_array('20 everything else (translated)', $plurals)); $this->assertTrue(in_array('21 everything else (translated)', $plurals)); $this->assertTrue(in_array('22 everything else (translated)', $plurals)); $this->assertTrue(in_array('23 everything else (translated)', $plurals)); $this->assertTrue(in_array('24 everything else (translated)', $plurals)); $this->assertTrue(in_array('25 everything else (translated)', $plurals)); $coreSingular = $this->__singularFromCore(); $this->assertEqual('Plural Rule 10 (from core translated)', $coreSingular); $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('2 ends in 2 (from core translated)', $corePlurals)); $this->assertTrue(in_array('3 ends in 03-04 (from core translated)', $corePlurals)); $this->assertTrue(in_array('4 ends in 03-04 (from core translated)', $corePlurals)); $this->assertTrue(in_array('5 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('6 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('7 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('8 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('9 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('10 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('11 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('12 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('13 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('14 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('15 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('16 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('17 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('18 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('19 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('20 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('21 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('22 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('23 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('24 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('25 everything else (from core translated)', $corePlurals)); }
testMoRulesTen method @access public @return void
testMoRulesTen
php
Datawalke/Coordino
cake/tests/cases/libs/i18n.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/i18n.test.php
MIT
function testPoRulesEleven() { Configure::write('Config.language', 'rule_11_po'); $singular = $this->__singular(); $this->assertEqual('Plural Rule 11 (translated)', $singular); $plurals = $this->__plural(); $this->assertTrue(in_array('0 everything else (translated)', $plurals)); $this->assertTrue(in_array('1 is 1 (translated)', $plurals)); $this->assertTrue(in_array('2 is 2 (translated)', $plurals)); $this->assertTrue(in_array('3 is 3-6 (translated)', $plurals)); $this->assertTrue(in_array('4 is 3-6 (translated)', $plurals)); $this->assertTrue(in_array('5 is 3-6 (translated)', $plurals)); $this->assertTrue(in_array('6 is 3-6 (translated)', $plurals)); $this->assertTrue(in_array('7 is 7-10 (translated)', $plurals)); $this->assertTrue(in_array('8 is 7-10 (translated)', $plurals)); $this->assertTrue(in_array('9 is 7-10 (translated)', $plurals)); $this->assertTrue(in_array('10 is 7-10 (translated)', $plurals)); $this->assertTrue(in_array('11 everything else (translated)', $plurals)); $this->assertTrue(in_array('12 everything else (translated)', $plurals)); $this->assertTrue(in_array('13 everything else (translated)', $plurals)); $this->assertTrue(in_array('14 everything else (translated)', $plurals)); $this->assertTrue(in_array('15 everything else (translated)', $plurals)); $this->assertTrue(in_array('16 everything else (translated)', $plurals)); $this->assertTrue(in_array('17 everything else (translated)', $plurals)); $this->assertTrue(in_array('18 everything else (translated)', $plurals)); $this->assertTrue(in_array('19 everything else (translated)', $plurals)); $this->assertTrue(in_array('20 everything else (translated)', $plurals)); $this->assertTrue(in_array('21 everything else (translated)', $plurals)); $this->assertTrue(in_array('22 everything else (translated)', $plurals)); $this->assertTrue(in_array('23 everything else (translated)', $plurals)); $this->assertTrue(in_array('24 everything else (translated)', $plurals)); $this->assertTrue(in_array('25 everything else (translated)', $plurals)); $coreSingular = $this->__singularFromCore(); $this->assertEqual('Plural Rule 11 (from core translated)', $coreSingular); $corePlurals = $this->__pluralFromCore(); $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('2 is 2 (from core translated)', $corePlurals)); $this->assertTrue(in_array('3 is 3-6 (from core translated)', $corePlurals)); $this->assertTrue(in_array('4 is 3-6 (from core translated)', $corePlurals)); $this->assertTrue(in_array('5 is 3-6 (from core translated)', $corePlurals)); $this->assertTrue(in_array('6 is 3-6 (from core translated)', $corePlurals)); $this->assertTrue(in_array('7 is 7-10 (from core translated)', $corePlurals)); $this->assertTrue(in_array('8 is 7-10 (from core translated)', $corePlurals)); $this->assertTrue(in_array('9 is 7-10 (from core translated)', $corePlurals)); $this->assertTrue(in_array('10 is 7-10 (from core translated)', $corePlurals)); $this->assertTrue(in_array('11 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('12 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('13 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('14 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('15 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('16 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('17 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('18 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('19 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('20 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('21 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('22 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('23 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('24 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('25 everything else (from core translated)', $corePlurals)); }
testPoRulesEleven method @access public @return void
testPoRulesEleven
php
Datawalke/Coordino
cake/tests/cases/libs/i18n.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/i18n.test.php
MIT
function testMoRulesEleven() { Configure::write('Config.language', 'rule_11_mo'); $singular = $this->__singular(); $this->assertEqual('Plural Rule 11 (translated)', $singular); $plurals = $this->__plural(); $this->assertTrue(in_array('0 everything else (translated)', $plurals)); $this->assertTrue(in_array('1 is 1 (translated)', $plurals)); $this->assertTrue(in_array('2 is 2 (translated)', $plurals)); $this->assertTrue(in_array('3 is 3-6 (translated)', $plurals)); $this->assertTrue(in_array('4 is 3-6 (translated)', $plurals)); $this->assertTrue(in_array('5 is 3-6 (translated)', $plurals)); $this->assertTrue(in_array('6 is 3-6 (translated)', $plurals)); $this->assertTrue(in_array('7 is 7-10 (translated)', $plurals)); $this->assertTrue(in_array('8 is 7-10 (translated)', $plurals)); $this->assertTrue(in_array('9 is 7-10 (translated)', $plurals)); $this->assertTrue(in_array('10 is 7-10 (translated)', $plurals)); $this->assertTrue(in_array('11 everything else (translated)', $plurals)); $this->assertTrue(in_array('12 everything else (translated)', $plurals)); $this->assertTrue(in_array('13 everything else (translated)', $plurals)); $this->assertTrue(in_array('14 everything else (translated)', $plurals)); $this->assertTrue(in_array('15 everything else (translated)', $plurals)); $this->assertTrue(in_array('16 everything else (translated)', $plurals)); $this->assertTrue(in_array('17 everything else (translated)', $plurals)); $this->assertTrue(in_array('18 everything else (translated)', $plurals)); $this->assertTrue(in_array('19 everything else (translated)', $plurals)); $this->assertTrue(in_array('20 everything else (translated)', $plurals)); $this->assertTrue(in_array('21 everything else (translated)', $plurals)); $this->assertTrue(in_array('22 everything else (translated)', $plurals)); $this->assertTrue(in_array('23 everything else (translated)', $plurals)); $this->assertTrue(in_array('24 everything else (translated)', $plurals)); $this->assertTrue(in_array('25 everything else (translated)', $plurals)); $coreSingular = $this->__singularFromCore(); $this->assertEqual('Plural Rule 11 (from core translated)', $coreSingular); $corePlurals = $this->__pluralFromCore(); $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('2 is 2 (from core translated)', $corePlurals)); $this->assertTrue(in_array('3 is 3-6 (from core translated)', $corePlurals)); $this->assertTrue(in_array('4 is 3-6 (from core translated)', $corePlurals)); $this->assertTrue(in_array('5 is 3-6 (from core translated)', $corePlurals)); $this->assertTrue(in_array('6 is 3-6 (from core translated)', $corePlurals)); $this->assertTrue(in_array('7 is 7-10 (from core translated)', $corePlurals)); $this->assertTrue(in_array('8 is 7-10 (from core translated)', $corePlurals)); $this->assertTrue(in_array('9 is 7-10 (from core translated)', $corePlurals)); $this->assertTrue(in_array('10 is 7-10 (from core translated)', $corePlurals)); $this->assertTrue(in_array('11 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('12 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('13 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('14 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('15 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('16 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('17 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('18 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('19 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('20 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('21 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('22 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('23 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('24 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('25 everything else (from core translated)', $corePlurals)); }
testMoRulesEleven method @access public @return void
testMoRulesEleven
php
Datawalke/Coordino
cake/tests/cases/libs/i18n.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/i18n.test.php
MIT
function testPoRulesTwelve() { Configure::write('Config.language', 'rule_12_po'); $singular = $this->__singular(); $this->assertEqual('Plural Rule 12 (translated)', $singular); $plurals = $this->__plural(); $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('2 is 2 (translated)', $plurals)); $this->assertTrue(in_array('3 is 0 or 3-10 (translated)', $plurals)); $this->assertTrue(in_array('4 is 0 or 3-10 (translated)', $plurals)); $this->assertTrue(in_array('5 is 0 or 3-10 (translated)', $plurals)); $this->assertTrue(in_array('6 is 0 or 3-10 (translated)', $plurals)); $this->assertTrue(in_array('7 is 0 or 3-10 (translated)', $plurals)); $this->assertTrue(in_array('8 is 0 or 3-10 (translated)', $plurals)); $this->assertTrue(in_array('9 is 0 or 3-10 (translated)', $plurals)); $this->assertTrue(in_array('10 is 0 or 3-10 (translated)', $plurals)); $this->assertTrue(in_array('11 everything else (translated)', $plurals)); $this->assertTrue(in_array('12 everything else (translated)', $plurals)); $this->assertTrue(in_array('13 everything else (translated)', $plurals)); $this->assertTrue(in_array('14 everything else (translated)', $plurals)); $this->assertTrue(in_array('15 everything else (translated)', $plurals)); $this->assertTrue(in_array('16 everything else (translated)', $plurals)); $this->assertTrue(in_array('17 everything else (translated)', $plurals)); $this->assertTrue(in_array('18 everything else (translated)', $plurals)); $this->assertTrue(in_array('19 everything else (translated)', $plurals)); $this->assertTrue(in_array('20 everything else (translated)', $plurals)); $this->assertTrue(in_array('21 everything else (translated)', $plurals)); $this->assertTrue(in_array('22 everything else (translated)', $plurals)); $this->assertTrue(in_array('23 everything else (translated)', $plurals)); $this->assertTrue(in_array('24 everything else (translated)', $plurals)); $this->assertTrue(in_array('25 everything else (translated)', $plurals)); $coreSingular = $this->__singularFromCore(); $this->assertEqual('Plural Rule 12 (from core translated)', $coreSingular); $corePlurals = $this->__pluralFromCore(); $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('2 is 2 (from core translated)', $corePlurals)); $this->assertTrue(in_array('3 is 0 or 3-10 (from core translated)', $corePlurals)); $this->assertTrue(in_array('4 is 0 or 3-10 (from core translated)', $corePlurals)); $this->assertTrue(in_array('5 is 0 or 3-10 (from core translated)', $corePlurals)); $this->assertTrue(in_array('6 is 0 or 3-10 (from core translated)', $corePlurals)); $this->assertTrue(in_array('7 is 0 or 3-10 (from core translated)', $corePlurals)); $this->assertTrue(in_array('8 is 0 or 3-10 (from core translated)', $corePlurals)); $this->assertTrue(in_array('9 is 0 or 3-10 (from core translated)', $corePlurals)); $this->assertTrue(in_array('10 is 0 or 3-10 (from core translated)', $corePlurals)); $this->assertTrue(in_array('11 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('12 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('13 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('14 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('15 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('16 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('17 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('18 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('19 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('20 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('21 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('22 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('23 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('24 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('25 everything else (from core translated)', $corePlurals)); }
testPoRulesTwelve method @access public @return void
testPoRulesTwelve
php
Datawalke/Coordino
cake/tests/cases/libs/i18n.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/i18n.test.php
MIT
function testMoRulesTwelve() { Configure::write('Config.language', 'rule_12_mo'); $singular = $this->__singular(); $this->assertEqual('Plural Rule 12 (translated)', $singular); $plurals = $this->__plural(); $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('2 is 2 (translated)', $plurals)); $this->assertTrue(in_array('3 is 0 or 3-10 (translated)', $plurals)); $this->assertTrue(in_array('4 is 0 or 3-10 (translated)', $plurals)); $this->assertTrue(in_array('5 is 0 or 3-10 (translated)', $plurals)); $this->assertTrue(in_array('6 is 0 or 3-10 (translated)', $plurals)); $this->assertTrue(in_array('7 is 0 or 3-10 (translated)', $plurals)); $this->assertTrue(in_array('8 is 0 or 3-10 (translated)', $plurals)); $this->assertTrue(in_array('9 is 0 or 3-10 (translated)', $plurals)); $this->assertTrue(in_array('10 is 0 or 3-10 (translated)', $plurals)); $this->assertTrue(in_array('11 everything else (translated)', $plurals)); $this->assertTrue(in_array('12 everything else (translated)', $plurals)); $this->assertTrue(in_array('13 everything else (translated)', $plurals)); $this->assertTrue(in_array('14 everything else (translated)', $plurals)); $this->assertTrue(in_array('15 everything else (translated)', $plurals)); $this->assertTrue(in_array('16 everything else (translated)', $plurals)); $this->assertTrue(in_array('17 everything else (translated)', $plurals)); $this->assertTrue(in_array('18 everything else (translated)', $plurals)); $this->assertTrue(in_array('19 everything else (translated)', $plurals)); $this->assertTrue(in_array('20 everything else (translated)', $plurals)); $this->assertTrue(in_array('21 everything else (translated)', $plurals)); $this->assertTrue(in_array('22 everything else (translated)', $plurals)); $this->assertTrue(in_array('23 everything else (translated)', $plurals)); $this->assertTrue(in_array('24 everything else (translated)', $plurals)); $this->assertTrue(in_array('25 everything else (translated)', $plurals)); $coreSingular = $this->__singularFromCore(); $this->assertEqual('Plural Rule 12 (from core translated)', $coreSingular); $corePlurals = $this->__pluralFromCore(); $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('2 is 2 (from core translated)', $corePlurals)); $this->assertTrue(in_array('3 is 0 or 3-10 (from core translated)', $corePlurals)); $this->assertTrue(in_array('4 is 0 or 3-10 (from core translated)', $corePlurals)); $this->assertTrue(in_array('5 is 0 or 3-10 (from core translated)', $corePlurals)); $this->assertTrue(in_array('6 is 0 or 3-10 (from core translated)', $corePlurals)); $this->assertTrue(in_array('7 is 0 or 3-10 (from core translated)', $corePlurals)); $this->assertTrue(in_array('8 is 0 or 3-10 (from core translated)', $corePlurals)); $this->assertTrue(in_array('9 is 0 or 3-10 (from core translated)', $corePlurals)); $this->assertTrue(in_array('10 is 0 or 3-10 (from core translated)', $corePlurals)); $this->assertTrue(in_array('11 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('12 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('13 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('14 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('15 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('16 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('17 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('18 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('19 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('20 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('21 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('22 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('23 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('24 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('25 everything else (from core translated)', $corePlurals)); }
testMoRulesTwelve method @access public @return void
testMoRulesTwelve
php
Datawalke/Coordino
cake/tests/cases/libs/i18n.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/i18n.test.php
MIT
function testPoRulesThirteen() { Configure::write('Config.language', 'rule_13_po'); $singular = $this->__singular(); $this->assertEqual('Plural Rule 13 (translated)', $singular); $plurals = $this->__plural(); $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('2 is 0 or ends in 01-10 (translated)', $plurals)); $this->assertTrue(in_array('3 is 0 or ends in 01-10 (translated)', $plurals)); $this->assertTrue(in_array('4 is 0 or ends in 01-10 (translated)', $plurals)); $this->assertTrue(in_array('5 is 0 or ends in 01-10 (translated)', $plurals)); $this->assertTrue(in_array('6 is 0 or ends in 01-10 (translated)', $plurals)); $this->assertTrue(in_array('7 is 0 or ends in 01-10 (translated)', $plurals)); $this->assertTrue(in_array('8 is 0 or ends in 01-10 (translated)', $plurals)); $this->assertTrue(in_array('9 is 0 or ends in 01-10 (translated)', $plurals)); $this->assertTrue(in_array('10 is 0 or ends in 01-10 (translated)', $plurals)); $this->assertTrue(in_array('11 ends in 11-20 (translated)', $plurals)); $this->assertTrue(in_array('12 ends in 11-20 (translated)', $plurals)); $this->assertTrue(in_array('13 ends in 11-20 (translated)', $plurals)); $this->assertTrue(in_array('14 ends in 11-20 (translated)', $plurals)); $this->assertTrue(in_array('15 ends in 11-20 (translated)', $plurals)); $this->assertTrue(in_array('16 ends in 11-20 (translated)', $plurals)); $this->assertTrue(in_array('17 ends in 11-20 (translated)', $plurals)); $this->assertTrue(in_array('18 ends in 11-20 (translated)', $plurals)); $this->assertTrue(in_array('19 ends in 11-20 (translated)', $plurals)); $this->assertTrue(in_array('20 ends in 11-20 (translated)', $plurals)); $this->assertTrue(in_array('21 everything else (translated)', $plurals)); $this->assertTrue(in_array('22 everything else (translated)', $plurals)); $this->assertTrue(in_array('23 everything else (translated)', $plurals)); $this->assertTrue(in_array('24 everything else (translated)', $plurals)); $this->assertTrue(in_array('25 everything else (translated)', $plurals)); $coreSingular = $this->__singularFromCore(); $this->assertEqual('Plural Rule 13 (from core translated)', $coreSingular); $corePlurals = $this->__pluralFromCore(); $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('2 is 0 or ends in 01-10 (from core translated)', $corePlurals)); $this->assertTrue(in_array('3 is 0 or ends in 01-10 (from core translated)', $corePlurals)); $this->assertTrue(in_array('4 is 0 or ends in 01-10 (from core translated)', $corePlurals)); $this->assertTrue(in_array('5 is 0 or ends in 01-10 (from core translated)', $corePlurals)); $this->assertTrue(in_array('6 is 0 or ends in 01-10 (from core translated)', $corePlurals)); $this->assertTrue(in_array('7 is 0 or ends in 01-10 (from core translated)', $corePlurals)); $this->assertTrue(in_array('8 is 0 or ends in 01-10 (from core translated)', $corePlurals)); $this->assertTrue(in_array('9 is 0 or ends in 01-10 (from core translated)', $corePlurals)); $this->assertTrue(in_array('10 is 0 or ends in 01-10 (from core translated)', $corePlurals)); $this->assertTrue(in_array('11 ends in 11-20 (from core translated)', $corePlurals)); $this->assertTrue(in_array('12 ends in 11-20 (from core translated)', $corePlurals)); $this->assertTrue(in_array('13 ends in 11-20 (from core translated)', $corePlurals)); $this->assertTrue(in_array('14 ends in 11-20 (from core translated)', $corePlurals)); $this->assertTrue(in_array('15 ends in 11-20 (from core translated)', $corePlurals)); $this->assertTrue(in_array('16 ends in 11-20 (from core translated)', $corePlurals)); $this->assertTrue(in_array('17 ends in 11-20 (from core translated)', $corePlurals)); $this->assertTrue(in_array('18 ends in 11-20 (from core translated)', $corePlurals)); $this->assertTrue(in_array('19 ends in 11-20 (from core translated)', $corePlurals)); $this->assertTrue(in_array('20 ends in 11-20 (from core translated)', $corePlurals)); $this->assertTrue(in_array('21 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('22 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('23 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('24 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('25 everything else (from core translated)', $corePlurals)); }
testPoRulesThirteen method @access public @return void
testPoRulesThirteen
php
Datawalke/Coordino
cake/tests/cases/libs/i18n.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/i18n.test.php
MIT
function testMoRulesThirteen() { Configure::write('Config.language', 'rule_13_mo'); $singular = $this->__singular(); $this->assertEqual('Plural Rule 13 (translated)', $singular); $plurals = $this->__plural(); $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('2 is 0 or ends in 01-10 (translated)', $plurals)); $this->assertTrue(in_array('3 is 0 or ends in 01-10 (translated)', $plurals)); $this->assertTrue(in_array('4 is 0 or ends in 01-10 (translated)', $plurals)); $this->assertTrue(in_array('5 is 0 or ends in 01-10 (translated)', $plurals)); $this->assertTrue(in_array('6 is 0 or ends in 01-10 (translated)', $plurals)); $this->assertTrue(in_array('7 is 0 or ends in 01-10 (translated)', $plurals)); $this->assertTrue(in_array('8 is 0 or ends in 01-10 (translated)', $plurals)); $this->assertTrue(in_array('9 is 0 or ends in 01-10 (translated)', $plurals)); $this->assertTrue(in_array('10 is 0 or ends in 01-10 (translated)', $plurals)); $this->assertTrue(in_array('11 ends in 11-20 (translated)', $plurals)); $this->assertTrue(in_array('12 ends in 11-20 (translated)', $plurals)); $this->assertTrue(in_array('13 ends in 11-20 (translated)', $plurals)); $this->assertTrue(in_array('14 ends in 11-20 (translated)', $plurals)); $this->assertTrue(in_array('15 ends in 11-20 (translated)', $plurals)); $this->assertTrue(in_array('16 ends in 11-20 (translated)', $plurals)); $this->assertTrue(in_array('17 ends in 11-20 (translated)', $plurals)); $this->assertTrue(in_array('18 ends in 11-20 (translated)', $plurals)); $this->assertTrue(in_array('19 ends in 11-20 (translated)', $plurals)); $this->assertTrue(in_array('20 ends in 11-20 (translated)', $plurals)); $this->assertTrue(in_array('21 everything else (translated)', $plurals)); $this->assertTrue(in_array('22 everything else (translated)', $plurals)); $this->assertTrue(in_array('23 everything else (translated)', $plurals)); $this->assertTrue(in_array('24 everything else (translated)', $plurals)); $this->assertTrue(in_array('25 everything else (translated)', $plurals)); $coreSingular = $this->__singularFromCore(); $this->assertEqual('Plural Rule 13 (from core translated)', $coreSingular); $corePlurals = $this->__pluralFromCore(); $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('2 is 0 or ends in 01-10 (from core translated)', $corePlurals)); $this->assertTrue(in_array('3 is 0 or ends in 01-10 (from core translated)', $corePlurals)); $this->assertTrue(in_array('4 is 0 or ends in 01-10 (from core translated)', $corePlurals)); $this->assertTrue(in_array('5 is 0 or ends in 01-10 (from core translated)', $corePlurals)); $this->assertTrue(in_array('6 is 0 or ends in 01-10 (from core translated)', $corePlurals)); $this->assertTrue(in_array('7 is 0 or ends in 01-10 (from core translated)', $corePlurals)); $this->assertTrue(in_array('8 is 0 or ends in 01-10 (from core translated)', $corePlurals)); $this->assertTrue(in_array('9 is 0 or ends in 01-10 (from core translated)', $corePlurals)); $this->assertTrue(in_array('10 is 0 or ends in 01-10 (from core translated)', $corePlurals)); $this->assertTrue(in_array('11 ends in 11-20 (from core translated)', $corePlurals)); $this->assertTrue(in_array('12 ends in 11-20 (from core translated)', $corePlurals)); $this->assertTrue(in_array('13 ends in 11-20 (from core translated)', $corePlurals)); $this->assertTrue(in_array('14 ends in 11-20 (from core translated)', $corePlurals)); $this->assertTrue(in_array('15 ends in 11-20 (from core translated)', $corePlurals)); $this->assertTrue(in_array('16 ends in 11-20 (from core translated)', $corePlurals)); $this->assertTrue(in_array('17 ends in 11-20 (from core translated)', $corePlurals)); $this->assertTrue(in_array('18 ends in 11-20 (from core translated)', $corePlurals)); $this->assertTrue(in_array('19 ends in 11-20 (from core translated)', $corePlurals)); $this->assertTrue(in_array('20 ends in 11-20 (from core translated)', $corePlurals)); $this->assertTrue(in_array('21 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('22 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('23 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('24 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('25 everything else (from core translated)', $corePlurals)); }
testMoRulesThirteen method @access public @return void
testMoRulesThirteen
php
Datawalke/Coordino
cake/tests/cases/libs/i18n.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/i18n.test.php
MIT
function testPoRulesFourteen() { Configure::write('Config.language', 'rule_14_po'); $singular = $this->__singular(); $this->assertEqual('Plural Rule 14 (translated)', $singular); $plurals = $this->__plural(); $this->assertTrue(in_array('0 everything else (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('3 everything else (translated)', $plurals)); $this->assertTrue(in_array('4 everything else (translated)', $plurals)); $this->assertTrue(in_array('5 everything else (translated)', $plurals)); $this->assertTrue(in_array('6 everything else (translated)', $plurals)); $this->assertTrue(in_array('7 everything else (translated)', $plurals)); $this->assertTrue(in_array('8 everything else (translated)', $plurals)); $this->assertTrue(in_array('9 everything else (translated)', $plurals)); $this->assertTrue(in_array('10 everything else (translated)', $plurals)); $this->assertTrue(in_array('11 ends in 1 (translated)', $plurals)); $this->assertTrue(in_array('12 ends in 2 (translated)', $plurals)); $this->assertTrue(in_array('13 everything else (translated)', $plurals)); $this->assertTrue(in_array('14 everything else (translated)', $plurals)); $this->assertTrue(in_array('15 everything else (translated)', $plurals)); $this->assertTrue(in_array('16 everything else (translated)', $plurals)); $this->assertTrue(in_array('17 everything else (translated)', $plurals)); $this->assertTrue(in_array('18 everything else (translated)', $plurals)); $this->assertTrue(in_array('19 everything else (translated)', $plurals)); $this->assertTrue(in_array('20 everything else (translated)', $plurals)); $this->assertTrue(in_array('21 ends in 1 (translated)', $plurals)); $this->assertTrue(in_array('22 ends in 2 (translated)', $plurals)); $this->assertTrue(in_array('23 everything else (translated)', $plurals)); $this->assertTrue(in_array('24 everything else (translated)', $plurals)); $this->assertTrue(in_array('25 everything else (translated)', $plurals)); $coreSingular = $this->__singularFromCore(); $this->assertEqual('Plural Rule 14 (from core translated)', $coreSingular); $corePlurals = $this->__pluralFromCore(); $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('2 ends in 2 (from core translated)', $corePlurals)); $this->assertTrue(in_array('3 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('4 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('5 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('6 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('7 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('8 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('9 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('10 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('11 ends in 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('12 ends in 2 (from core translated)', $corePlurals)); $this->assertTrue(in_array('13 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('14 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('15 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('16 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('17 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('18 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('19 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('20 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('21 ends in 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('22 ends in 2 (from core translated)', $corePlurals)); $this->assertTrue(in_array('23 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('24 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('25 everything else (from core translated)', $corePlurals)); }
testPoRulesFourteen method @access public @return void
testPoRulesFourteen
php
Datawalke/Coordino
cake/tests/cases/libs/i18n.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/i18n.test.php
MIT
function testMoRulesFourteen() { Configure::write('Config.language', 'rule_14_mo'); $singular = $this->__singular(); $this->assertEqual('Plural Rule 14 (translated)', $singular); $plurals = $this->__plural(); $this->assertTrue(in_array('0 everything else (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('3 everything else (translated)', $plurals)); $this->assertTrue(in_array('4 everything else (translated)', $plurals)); $this->assertTrue(in_array('5 everything else (translated)', $plurals)); $this->assertTrue(in_array('6 everything else (translated)', $plurals)); $this->assertTrue(in_array('7 everything else (translated)', $plurals)); $this->assertTrue(in_array('8 everything else (translated)', $plurals)); $this->assertTrue(in_array('9 everything else (translated)', $plurals)); $this->assertTrue(in_array('10 everything else (translated)', $plurals)); $this->assertTrue(in_array('11 ends in 1 (translated)', $plurals)); $this->assertTrue(in_array('12 ends in 2 (translated)', $plurals)); $this->assertTrue(in_array('13 everything else (translated)', $plurals)); $this->assertTrue(in_array('14 everything else (translated)', $plurals)); $this->assertTrue(in_array('15 everything else (translated)', $plurals)); $this->assertTrue(in_array('16 everything else (translated)', $plurals)); $this->assertTrue(in_array('17 everything else (translated)', $plurals)); $this->assertTrue(in_array('18 everything else (translated)', $plurals)); $this->assertTrue(in_array('19 everything else (translated)', $plurals)); $this->assertTrue(in_array('20 everything else (translated)', $plurals)); $this->assertTrue(in_array('21 ends in 1 (translated)', $plurals)); $this->assertTrue(in_array('22 ends in 2 (translated)', $plurals)); $this->assertTrue(in_array('23 everything else (translated)', $plurals)); $this->assertTrue(in_array('24 everything else (translated)', $plurals)); $this->assertTrue(in_array('25 everything else (translated)', $plurals)); $coreSingular = $this->__singularFromCore(); $this->assertEqual('Plural Rule 14 (from core translated)', $coreSingular); $corePlurals = $this->__pluralFromCore(); $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('2 ends in 2 (from core translated)', $corePlurals)); $this->assertTrue(in_array('3 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('4 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('5 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('6 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('7 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('8 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('9 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('10 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('11 ends in 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('12 ends in 2 (from core translated)', $corePlurals)); $this->assertTrue(in_array('13 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('14 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('15 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('16 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('17 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('18 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('19 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('20 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('21 ends in 1 (from core translated)', $corePlurals)); $this->assertTrue(in_array('22 ends in 2 (from core translated)', $corePlurals)); $this->assertTrue(in_array('23 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('24 everything else (from core translated)', $corePlurals)); $this->assertTrue(in_array('25 everything else (from core translated)', $corePlurals)); }
testMoRulesFourteen method @access public @return void
testMoRulesFourteen
php
Datawalke/Coordino
cake/tests/cases/libs/i18n.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/i18n.test.php
MIT
function testSetLanguageWithSession () { $_SESSION['Config']['language'] = 'po'; $singular = $this->__singular(); $this->assertEqual('Po (translated)', $singular); $plurals = $this->__plural(); $this->assertTrue(in_array('0 everything else (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('3 is 2-4 (po translated)', $plurals)); $this->assertTrue(in_array('4 is 2-4 (po translated)', $plurals)); $this->assertTrue(in_array('5 everything else (po translated)', $plurals)); $this->assertTrue(in_array('6 everything else (po translated)', $plurals)); $this->assertTrue(in_array('7 everything else (po translated)', $plurals)); $this->assertTrue(in_array('8 everything else (po translated)', $plurals)); $this->assertTrue(in_array('9 everything else (po translated)', $plurals)); $this->assertTrue(in_array('10 everything else (po translated)', $plurals)); $this->assertTrue(in_array('11 everything else (po translated)', $plurals)); $this->assertTrue(in_array('12 everything else (po translated)', $plurals)); $this->assertTrue(in_array('13 everything else (po translated)', $plurals)); $this->assertTrue(in_array('14 everything else (po translated)', $plurals)); $this->assertTrue(in_array('15 everything else (po translated)', $plurals)); $this->assertTrue(in_array('16 everything else (po translated)', $plurals)); $this->assertTrue(in_array('17 everything else (po translated)', $plurals)); $this->assertTrue(in_array('18 everything else (po translated)', $plurals)); $this->assertTrue(in_array('19 everything else (po translated)', $plurals)); $this->assertTrue(in_array('20 everything else (po translated)', $plurals)); $this->assertTrue(in_array('21 everything else (po translated)', $plurals)); $this->assertTrue(in_array('22 everything else (po translated)', $plurals)); $this->assertTrue(in_array('23 everything else (po translated)', $plurals)); $this->assertTrue(in_array('24 everything else (po translated)', $plurals)); $this->assertTrue(in_array('25 everything else (po translated)', $plurals)); unset($_SESSION['Config']['language']); }
testSetLanguageWithSession method @access public @return void
testSetLanguageWithSession
php
Datawalke/Coordino
cake/tests/cases/libs/i18n.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/i18n.test.php
MIT
function testNoCoreTranslation () { Configure::write('Config.language', 'po'); $singular = $this->__singular(); $this->assertEqual('Po (translated)', $singular); $coreSingular = $this->__singularFromCore(); $this->assertNotEqual('Po (from core translated)', $coreSingular); $corePlurals = $this->__pluralFromCore(); $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('2 is 2-4 (from core translated)', $corePlurals)); $this->assertFalse(in_array('3 is 2-4 (from core translated)', $corePlurals)); $this->assertFalse(in_array('4 is 2-4 (from core translated)', $corePlurals)); $this->assertFalse(in_array('5 everything else (from core translated)', $corePlurals)); $this->assertFalse(in_array('6 everything else (from core translated)', $corePlurals)); $this->assertFalse(in_array('7 everything else (from core translated)', $corePlurals)); $this->assertFalse(in_array('8 everything else (from core translated)', $corePlurals)); $this->assertFalse(in_array('9 everything else (from core translated)', $corePlurals)); $this->assertFalse(in_array('10 everything else (from core translated)', $corePlurals)); $this->assertFalse(in_array('11 everything else (from core translated)', $corePlurals)); $this->assertFalse(in_array('12 everything else (from core translated)', $corePlurals)); $this->assertFalse(in_array('13 everything else (from core translated)', $corePlurals)); $this->assertFalse(in_array('14 everything else (from core translated)', $corePlurals)); $this->assertFalse(in_array('15 everything else (from core translated)', $corePlurals)); $this->assertFalse(in_array('16 everything else (from core translated)', $corePlurals)); $this->assertFalse(in_array('17 everything else (from core translated)', $corePlurals)); $this->assertFalse(in_array('18 everything else (from core translated)', $corePlurals)); $this->assertFalse(in_array('19 everything else (from core translated)', $corePlurals)); $this->assertFalse(in_array('20 everything else (from core translated)', $corePlurals)); $this->assertFalse(in_array('21 everything else (from core translated)', $corePlurals)); $this->assertFalse(in_array('22 everything else (from core translated)', $corePlurals)); $this->assertFalse(in_array('23 everything else (from core translated)', $corePlurals)); $this->assertFalse(in_array('24 everything else (from core translated)', $corePlurals)); $this->assertFalse(in_array('25 everything else (from core translated)', $corePlurals)); }
testNoCoreTranslation method @access public @return void
testNoCoreTranslation
php
Datawalke/Coordino
cake/tests/cases/libs/i18n.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/i18n.test.php
MIT
function testPluginTranslation() { App::build(array( 'plugins' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS) )); Configure::write('Config.language', 'po'); $singular = $this->__domainSingular(); $this->assertEqual('Plural Rule 1 (from plugin)', $singular); $plurals = $this->__domainPlural(); $this->assertTrue(in_array('0 = 0 or > 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('3 = 0 or > 1 (from plugin)', $plurals)); $this->assertTrue(in_array('4 = 0 or > 1 (from plugin)', $plurals)); $this->assertTrue(in_array('5 = 0 or > 1 (from plugin)', $plurals)); $this->assertTrue(in_array('6 = 0 or > 1 (from plugin)', $plurals)); $this->assertTrue(in_array('7 = 0 or > 1 (from plugin)', $plurals)); $this->assertTrue(in_array('8 = 0 or > 1 (from plugin)', $plurals)); $this->assertTrue(in_array('9 = 0 or > 1 (from plugin)', $plurals)); $this->assertTrue(in_array('10 = 0 or > 1 (from plugin)', $plurals)); $this->assertTrue(in_array('11 = 0 or > 1 (from plugin)', $plurals)); $this->assertTrue(in_array('12 = 0 or > 1 (from plugin)', $plurals)); $this->assertTrue(in_array('13 = 0 or > 1 (from plugin)', $plurals)); $this->assertTrue(in_array('14 = 0 or > 1 (from plugin)', $plurals)); $this->assertTrue(in_array('15 = 0 or > 1 (from plugin)', $plurals)); $this->assertTrue(in_array('16 = 0 or > 1 (from plugin)', $plurals)); $this->assertTrue(in_array('17 = 0 or > 1 (from plugin)', $plurals)); $this->assertTrue(in_array('18 = 0 or > 1 (from plugin)', $plurals)); $this->assertTrue(in_array('19 = 0 or > 1 (from plugin)', $plurals)); $this->assertTrue(in_array('20 = 0 or > 1 (from plugin)', $plurals)); $this->assertTrue(in_array('21 = 0 or > 1 (from plugin)', $plurals)); $this->assertTrue(in_array('22 = 0 or > 1 (from plugin)', $plurals)); $this->assertTrue(in_array('23 = 0 or > 1 (from plugin)', $plurals)); $this->assertTrue(in_array('24 = 0 or > 1 (from plugin)', $plurals)); $this->assertTrue(in_array('25 = 0 or > 1 (from plugin)', $plurals)); }
testPluginTranslation method @access public @return void
testPluginTranslation
php
Datawalke/Coordino
cake/tests/cases/libs/i18n.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/i18n.test.php
MIT
function testPoMultipleLineTranslation () { Configure::write('Config.language', 'po'); $string = "This is a multiline translation\n"; $string .= "broken up over multiple lines.\n"; $string .= "This is the third line.\n"; $string .= "This is the forth line."; $result = __($string, true); $expected = "This is a multiline translation\n"; $expected .= "broken up over multiple lines.\n"; $expected .= "This is the third line.\n"; $expected .= "This is the forth line. (translated)"; $this->assertEqual($result, $expected); // Windows Newline is \r\n $string = "This is a multiline translation\r\n"; $string .= "broken up over multiple lines.\r\n"; $string .= "This is the third line.\r\n"; $string .= "This is the forth line."; $result = __($string, true); $this->assertEqual($result, $expected); $singular = "valid\nsecond line"; $plural = "valids\nsecond line"; $result = __n($singular, $plural, 1, true); $expected = "v\nsecond line"; $this->assertEqual($result, $expected); $result = __n($singular, $plural, 2, true); $expected = "vs\nsecond line"; $this->assertEqual($result, $expected); $string = "This is a multiline translation\n"; $string .= "broken up over multiple lines.\n"; $string .= "This is the third line.\n"; $string .= "This is the forth line."; $singular = "%d = 1\n" . $string; $plural = "%d = 0 or > 1\n" . $string; $result = __n($singular, $plural, 1, true); $expected = "%d is 1\n" . $string; $this->assertEqual($result, $expected); $result = __n($singular, $plural, 2, true); $expected = "%d is 2-4\n" . $string; $this->assertEqual($result, $expected); // Windows Newline is \r\n $string = "This is a multiline translation\r\n"; $string .= "broken up over multiple lines.\r\n"; $string .= "This is the third line.\r\n"; $string .= "This is the forth line."; $singular = "%d = 1\r\n" . $string; $plural = "%d = 0 or > 1\r\n" . $string; $result = __n($singular, $plural, 1, true); $expected = "%d is 1\n" . str_replace("\r\n", "\n", $string); $this->assertEqual($result, $expected); $result = __n($singular, $plural, 2, true); $expected = "%d is 2-4\n" . str_replace("\r\n", "\n", $string); $this->assertEqual($result, $expected); }
testPoMultipleLineTranslation method @access public @return void
testPoMultipleLineTranslation
php
Datawalke/Coordino
cake/tests/cases/libs/i18n.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/i18n.test.php
MIT
function testPoNoTranslationNeeded () { Configure::write('Config.language', 'po'); $result = __('No Translation needed', true); $this->assertEqual($result, 'No Translation needed'); }
testPoNoTranslationNeeded method @access public @return void
testPoNoTranslationNeeded
php
Datawalke/Coordino
cake/tests/cases/libs/i18n.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/i18n.test.php
MIT
function testPoQuotedString () { $expected = 'this is a "quoted string" (translated)'; $this->assertEqual(__('this is a "quoted string"', true), $expected); }
testPoQuotedString method @access public @return void
testPoQuotedString
php
Datawalke/Coordino
cake/tests/cases/libs/i18n.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/i18n.test.php
MIT
function testFloatValue() { Configure::write('Config.language', 'rule_9_po'); $result = __n('%d = 1', '%d = 0 or > 1', (float)1, true); $expected = '%d is 1 (translated)'; $this->assertEqual($result, $expected); $result = __n('%d = 1', '%d = 0 or > 1', (float)2, true); $expected = "%d ends in 2-4, not 12-14 (translated)"; $this->assertEqual($result, $expected); $result = __n('%d = 1', '%d = 0 or > 1', (float)5, true); $expected = "%d everything else (translated)"; $this->assertEqual($result, $expected); }
testFloatValue method @access public @return void
testFloatValue
php
Datawalke/Coordino
cake/tests/cases/libs/i18n.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/i18n.test.php
MIT
function testCategory() { Configure::write('Config.language', 'po'); $category = $this->__category(); $this->assertEqual('Monetary Po (translated)', $category); }
testCategory method @access public @return void
testCategory
php
Datawalke/Coordino
cake/tests/cases/libs/i18n.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/i18n.test.php
MIT
function testPluginCategory() { Configure::write('Config.language', 'po'); $singular = $this->__domainCategorySingular(); $this->assertEqual('Monetary Plural Rule 1 (from plugin)', $singular); $plurals = $this->__domainCategoryPlural(); $this->assertTrue(in_array('Monetary 0 = 0 or > 1 (from plugin)', $plurals)); $this->assertTrue(in_array('Monetary 1 = 1 (from plugin)', $plurals)); }
testPluginCategory method @access public @return void
testPluginCategory
php
Datawalke/Coordino
cake/tests/cases/libs/i18n.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/i18n.test.php
MIT
function testCategoryThenSingular() { Configure::write('Config.language', 'po'); $category = $this->__category(); $this->assertEqual('Monetary Po (translated)', $category); $singular = $this->__singular(); $this->assertEqual('Po (translated)', $singular); }
testCategoryThenSingular method @access public @return void
testCategoryThenSingular
php
Datawalke/Coordino
cake/tests/cases/libs/i18n.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/i18n.test.php
MIT
function __domainCategorySingular($domain = 'test_plugin', $category = 3) { $singular = __dc($domain, 'Plural Rule 1', $category, true); return $singular; }
Singular method @access private @return void
__domainCategorySingular
php
Datawalke/Coordino
cake/tests/cases/libs/i18n.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/i18n.test.php
MIT
function __domainCategoryPlural($domain = 'test_plugin', $category = 3) { $plurals = array(); for ($number = 0; $number <= 25; $number++) { $plurals[] = sprintf(__dcn($domain, '%d = 1', '%d = 0 or > 1', (float)$number, $category, true), (float)$number); } return $plurals; }
Plural method @access private @return void
__domainCategoryPlural
php
Datawalke/Coordino
cake/tests/cases/libs/i18n.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/i18n.test.php
MIT
function __domainSingular($domain = 'test_plugin') { $singular = __d($domain, 'Plural Rule 1', true); return $singular; }
Singular method @access private @return void
__domainSingular
php
Datawalke/Coordino
cake/tests/cases/libs/i18n.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/i18n.test.php
MIT
function __domainPlural($domain = 'test_plugin') { $plurals = array(); for ($number = 0; $number <= 25; $number++) { $plurals[] = sprintf(__dn($domain, '%d = 1', '%d = 0 or > 1', (float)$number, true), (float)$number ); } return $plurals; }
Plural method @access private @return void
__domainPlural
php
Datawalke/Coordino
cake/tests/cases/libs/i18n.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/i18n.test.php
MIT
function __category($category = 3) { $singular = __c('Plural Rule 1', $category, true); return $singular; }
category method @access private @return void
__category
php
Datawalke/Coordino
cake/tests/cases/libs/i18n.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/i18n.test.php
MIT
function __singular() { $singular = __('Plural Rule 1', true); return $singular; }
Singular method @access private @return void
__singular
php
Datawalke/Coordino
cake/tests/cases/libs/i18n.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/i18n.test.php
MIT
function __plural() { $plurals = array(); for ($number = 0; $number <= 25; $number++) { $plurals[] = sprintf(__n('%d = 1', '%d = 0 or > 1', (float)$number, true), (float)$number ); } return $plurals; }
Plural method @access private @return void
__plural
php
Datawalke/Coordino
cake/tests/cases/libs/i18n.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/i18n.test.php
MIT
function __singularFromCore() { $singular = __('Plural Rule 1 (from core)', true); return $singular; }
singularFromCore method @access private @return void
__singularFromCore
php
Datawalke/Coordino
cake/tests/cases/libs/i18n.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/i18n.test.php
MIT
function __pluralFromCore() { $plurals = array(); for ($number = 0; $number <= 25; $number++) { $plurals[] = sprintf(__n('%d = 1 (from core)', '%d = 0 or > 1 (from core)', (float)$number, true), (float)$number ); } return $plurals; }
pluralFromCore method @access private @return void
__pluralFromCore
php
Datawalke/Coordino
cake/tests/cases/libs/i18n.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/i18n.test.php
MIT
function testInstantiation() { $Inflector =& Inflector::getInstance(); $this->assertEqual(Inflector::getInstance(), $Inflector); }
testInstantiation method @access public @return void
testInstantiation
php
Datawalke/Coordino
cake/tests/cases/libs/inflector.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/inflector.test.php
MIT
function testInflectingSingulars() { $this->assertEqual(Inflector::singularize('categorias'), 'categoria'); $this->assertEqual(Inflector::singularize('menus'), 'menu'); $this->assertEqual(Inflector::singularize('news'), 'news'); $this->assertEqual(Inflector::singularize('food_menus'), 'food_menu'); $this->assertEqual(Inflector::singularize('Menus'), 'Menu'); $this->assertEqual(Inflector::singularize('FoodMenus'), 'FoodMenu'); $this->assertEqual(Inflector::singularize('houses'), 'house'); $this->assertEqual(Inflector::singularize('powerhouses'), 'powerhouse'); $this->assertEqual(Inflector::singularize('quizzes'), 'quiz'); $this->assertEqual(Inflector::singularize('Buses'), 'Bus'); $this->assertEqual(Inflector::singularize('buses'), 'bus'); $this->assertEqual(Inflector::singularize('matrix_rows'), 'matrix_row'); $this->assertEqual(Inflector::singularize('matrices'), 'matrix'); $this->assertEqual(Inflector::singularize('vertices'), 'vertex'); $this->assertEqual(Inflector::singularize('indices'), 'index'); $this->assertEqual(Inflector::singularize('Aliases'), 'Alias'); $this->assertEqual(Inflector::singularize('Alias'), 'Alias'); $this->assertEqual(Inflector::singularize('Media'), 'Media'); $this->assertEqual(Inflector::singularize('NodeMedia'), 'NodeMedia'); $this->assertEqual(Inflector::singularize('alumni'), 'alumnus'); $this->assertEqual(Inflector::singularize('bacilli'), 'bacillus'); $this->assertEqual(Inflector::singularize('cacti'), 'cactus'); $this->assertEqual(Inflector::singularize('foci'), 'focus'); $this->assertEqual(Inflector::singularize('fungi'), 'fungus'); $this->assertEqual(Inflector::singularize('nuclei'), 'nucleus'); $this->assertEqual(Inflector::singularize('octopuses'), 'octopus'); $this->assertEqual(Inflector::singularize('radii'), 'radius'); $this->assertEqual(Inflector::singularize('stimuli'), 'stimulus'); $this->assertEqual(Inflector::singularize('syllabi'), 'syllabus'); $this->assertEqual(Inflector::singularize('termini'), 'terminus'); $this->assertEqual(Inflector::singularize('viri'), 'virus'); $this->assertEqual(Inflector::singularize('people'), 'person'); $this->assertEqual(Inflector::singularize('gloves'), 'glove'); $this->assertEqual(Inflector::singularize('doves'), 'dove'); $this->assertEqual(Inflector::singularize('lives'), 'life'); $this->assertEqual(Inflector::singularize('knives'), 'knife'); $this->assertEqual(Inflector::singularize('wolves'), 'wolf'); $this->assertEqual(Inflector::singularize('slaves'), 'slave'); $this->assertEqual(Inflector::singularize('shelves'), 'shelf'); $this->assertEqual(Inflector::singularize('taxis'), 'taxi'); $this->assertEqual(Inflector::singularize('taxes'), 'tax'); $this->assertEqual(Inflector::singularize('Taxes'), 'Tax'); $this->assertEqual(Inflector::singularize('AwesomeTaxes'), 'AwesomeTax'); $this->assertEqual(Inflector::singularize('faxes'), 'fax'); $this->assertEqual(Inflector::singularize('waxes'), 'wax'); $this->assertEqual(Inflector::singularize('niches'), 'niche'); $this->assertEqual(Inflector::singularize('waves'), 'wave'); $this->assertEqual(Inflector::singularize('bureaus'), 'bureau'); $this->assertEqual(Inflector::singularize('genetic_analyses'), 'genetic_analysis'); $this->assertEqual(Inflector::singularize('doctor_diagnoses'), 'doctor_diagnosis'); $this->assertEqual(Inflector::singularize('parantheses'), 'paranthesis'); $this->assertEqual(Inflector::singularize('Causes'), 'Cause'); $this->assertEqual(Inflector::singularize('colossuses'), 'colossus'); $this->assertEqual(Inflector::singularize('diagnoses'), 'diagnosis'); $this->assertEqual(Inflector::singularize('bases'), 'basis'); $this->assertEqual(Inflector::singularize('analyses'), 'analysis'); $this->assertEqual(Inflector::singularize('curves'), 'curve'); $this->assertEqual(Inflector::singularize('cafes'), 'cafe'); $this->assertEqual(Inflector::singularize('roofs'), 'roof'); $this->assertEqual(Inflector::singularize('foes'), 'foe'); $this->assertEqual(Inflector::singularize('databases'), 'database'); $this->assertEqual(Inflector::singularize(''), ''); }
testInflectingSingulars method @access public @return void
testInflectingSingulars
php
Datawalke/Coordino
cake/tests/cases/libs/inflector.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/inflector.test.php
MIT
function testInflectorSlugWithMap() { $result = Inflector::slug('replace every r', array('/r/' => '1')); $expected = '1eplace_eve1y_1'; $this->assertEqual($result, $expected); $result = Inflector::slug('replace every r', '_', array('/r/' => '1')); $expected = '1eplace_eve1y_1'; $this->assertEqual($result, $expected); }
testInflectorSlugWithMap method @access public @return void
testInflectorSlugWithMap
php
Datawalke/Coordino
cake/tests/cases/libs/inflector.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/inflector.test.php
MIT
function testInflectorUnderscore() { $this->assertIdentical(Inflector::underscore('TestThing'), 'test_thing'); $this->assertIdentical(Inflector::underscore('testThing'), 'test_thing'); $this->assertIdentical(Inflector::underscore('TestThingExtra'), 'test_thing_extra'); $this->assertIdentical(Inflector::underscore('testThingExtra'), 'test_thing_extra'); // Identical checks test the cache code path. $this->assertIdentical(Inflector::underscore('TestThing'), 'test_thing'); $this->assertIdentical(Inflector::underscore('testThing'), 'test_thing'); $this->assertIdentical(Inflector::underscore('TestThingExtra'), 'test_thing_extra'); $this->assertIdentical(Inflector::underscore('testThingExtra'), 'test_thing_extra'); // Test stupid values $this->assertIdentical(Inflector::underscore(''), ''); $this->assertIdentical(Inflector::underscore(0), '0'); $this->assertIdentical(Inflector::underscore(false), ''); }
testInflectorUnderscore method @return void @access public
testInflectorUnderscore
php
Datawalke/Coordino
cake/tests/cases/libs/inflector.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/inflector.test.php
MIT
function testVariableNaming() { $this->assertEqual(Inflector::variable('test_field'), 'testField'); $this->assertEqual(Inflector::variable('test_fieLd'), 'testFieLd'); $this->assertEqual(Inflector::variable('test field'), 'testField'); $this->assertEqual(Inflector::variable('Test_field'), 'testField'); }
testVariableNaming method @access public @return void
testVariableNaming
php
Datawalke/Coordino
cake/tests/cases/libs/inflector.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/inflector.test.php
MIT
function testClassNaming() { $this->assertEqual(Inflector::classify('artists_genres'), 'ArtistsGenre'); $this->assertEqual(Inflector::classify('file_systems'), 'FileSystem'); $this->assertEqual(Inflector::classify('news'), 'News'); $this->assertEqual(Inflector::classify('bureaus'), 'Bureau'); }
testClassNaming method @access public @return void
testClassNaming
php
Datawalke/Coordino
cake/tests/cases/libs/inflector.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/inflector.test.php
MIT
function testTableNaming() { $this->assertEqual(Inflector::tableize('ArtistsGenre'), 'artists_genres'); $this->assertEqual(Inflector::tableize('FileSystem'), 'file_systems'); $this->assertEqual(Inflector::tableize('News'), 'news'); $this->assertEqual(Inflector::tableize('Bureau'), 'bureaus'); }
testTableNaming method @access public @return void
testTableNaming
php
Datawalke/Coordino
cake/tests/cases/libs/inflector.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/inflector.test.php
MIT
function testHumanization() { $this->assertEqual(Inflector::humanize('posts'), 'Posts'); $this->assertEqual(Inflector::humanize('posts_tags'), 'Posts Tags'); $this->assertEqual(Inflector::humanize('file_systems'), 'File Systems'); }
testHumanization method @access public @return void
testHumanization
php
Datawalke/Coordino
cake/tests/cases/libs/inflector.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/inflector.test.php
MIT
function testRulesNoErrorPHP4() { Inflector::rules('plural', array( 'rules' => array(), 'irregular' => array(), 'uninflected' => array('pays') )); }
This test if run in isolation should not cause errors in PHP4. @return void
testRulesNoErrorPHP4
php
Datawalke/Coordino
cake/tests/cases/libs/inflector.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/inflector.test.php
MIT
function testCustomPluralRule() { Inflector::rules('plural', array('/^(custom)$/i' => '\1izables')); $this->assertEqual(Inflector::pluralize('custom'), 'customizables'); Inflector::rules('plural', array('uninflected' => array('uninflectable'))); $this->assertEqual(Inflector::pluralize('uninflectable'), 'uninflectable'); Inflector::rules('plural', array( 'rules' => array('/^(alert)$/i' => '\1ables'), 'uninflected' => array('noflect', 'abtuse'), 'irregular' => array('amaze' => 'amazable', 'phone' => 'phonezes') )); $this->assertEqual(Inflector::pluralize('noflect'), 'noflect'); $this->assertEqual(Inflector::pluralize('abtuse'), 'abtuse'); $this->assertEqual(Inflector::pluralize('alert'), 'alertables'); $this->assertEqual(Inflector::pluralize('amaze'), 'amazable'); $this->assertEqual(Inflector::pluralize('phone'), 'phonezes'); }
testCustomPluralRule method @access public @return void
testCustomPluralRule
php
Datawalke/Coordino
cake/tests/cases/libs/inflector.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/inflector.test.php
MIT
function testCustomSingularRule() { Inflector::rules('singular', array('/(eple)r$/i' => '\1', '/(jente)r$/i' => '\1')); $this->assertEqual(Inflector::singularize('epler'), 'eple'); $this->assertEqual(Inflector::singularize('jenter'), 'jente'); Inflector::rules('singular', array( 'rules' => array('/^(bil)er$/i' => '\1', '/^(inflec|contribu)tors$/i' => '\1ta'), 'uninflected' => array('singulars'), 'irregular' => array('spins' => 'spinor') )); $this->assertEqual(Inflector::singularize('inflectors'), 'inflecta'); $this->assertEqual(Inflector::singularize('contributors'), 'contributa'); $this->assertEqual(Inflector::singularize('spins'), 'spinor'); $this->assertEqual(Inflector::singularize('singulars'), 'singulars'); }
testCustomSingularRule method @access public @return void
testCustomSingularRule
php
Datawalke/Coordino
cake/tests/cases/libs/inflector.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/inflector.test.php
MIT
function testRulesClearsCaches() { $this->assertEqual(Inflector::singularize('Bananas'), 'Banana'); $this->assertEqual(Inflector::tableize('Banana'), 'bananas'); $this->assertEqual(Inflector::pluralize('Banana'), 'Bananas'); Inflector::rules('singular', array( 'rules' => array('/(.*)nas$/i' => '\1zzz') )); $this->assertEqual(Inflector::singularize('Bananas'), 'Banazzz', 'Was inflected with old rules. %s'); Inflector::rules('plural', array( 'rules' => array('/(.*)na$/i' => '\1zzz'), 'irregular' => array('corpus' => 'corpora') )); $this->assertEqual(Inflector::pluralize('Banana'), 'Banazzz', 'Was inflected with old rules: %s'); $this->assertEqual(Inflector::pluralize('corpus'), 'corpora', 'Was inflected with old irregular form: %s'); }
test that setting new rules clears the inflector caches. @return void
testRulesClearsCaches
php
Datawalke/Coordino
cake/tests/cases/libs/inflector.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/inflector.test.php
MIT
function testCustomRuleWithReset() { $uninflected = array('atlas', 'lapis', 'onibus', 'pires', 'virus', '.*x'); $pluralIrregular = array('as' => 'ases'); Inflector::rules('singular', array( 'rules' => array('/^(.*)(a|e|o|u)is$/i' => '\1\2l'), 'uninflected' => $uninflected, ), true); Inflector::rules('plural', array( 'rules' => array( '/^(.*)(a|e|o|u)l$/i' => '\1\2is', ), 'uninflected' => $uninflected, 'irregular' => $pluralIrregular ), true); $this->assertEqual(Inflector::pluralize('Alcool'), 'Alcoois'); $this->assertEqual(Inflector::pluralize('Atlas'), 'Atlas'); $this->assertEqual(Inflector::singularize('Alcoois'), 'Alcool'); $this->assertEqual(Inflector::singularize('Atlas'), 'Atlas'); }
Test resetting inflection rules. @return void
testCustomRuleWithReset
php
Datawalke/Coordino
cake/tests/cases/libs/inflector.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/inflector.test.php
MIT
function testGet() { $l10n =& new L10n(); // Catalog Entry $l10n->get('en'); $this->assertEqual($l10n->language, 'English'); $this->assertEqual($l10n->languagePath, array('eng', 'eng')); $this->assertEqual($l10n->locale, 'eng'); // Map Entry $l10n->get('eng'); $this->assertEqual($l10n->language, 'English'); $this->assertEqual($l10n->languagePath, array('eng', 'eng')); $this->assertEqual($l10n->locale, 'eng'); // Catalog Entry $l10n->get('en-ca'); $this->assertEqual($l10n->language, 'English (Canadian)'); $this->assertEqual($l10n->languagePath, array('en_ca', 'eng')); $this->assertEqual($l10n->locale, 'en_ca'); // Default Entry define('DEFAULT_LANGUAGE', 'en-us'); $l10n->get('use_default'); $this->assertEqual($l10n->language, 'English (United States)'); $this->assertEqual($l10n->languagePath, array('en_us', 'eng')); $this->assertEqual($l10n->locale, 'en_us'); $l10n->get('es'); $l10n->get(''); $this->assertEqual($l10n->lang, 'en-us'); // Using $this->default $l10n = new L10n(); $l10n->get('use_default'); $this->assertEqual($l10n->language, 'English (United States)'); $this->assertEqual($l10n->languagePath, array('en_us', 'eng', 'eng')); $this->assertEqual($l10n->locale, 'en_us'); }
testGet method @access public @return void
testGet
php
Datawalke/Coordino
cake/tests/cases/libs/l10n.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/l10n.test.php
MIT
function testGetAutoLanguage() { $__SERVER = $_SERVER; $_SERVER['HTTP_ACCEPT_LANGUAGE'] = 'inexistent,en-ca'; $l10n =& new L10n(); $l10n->get(); $this->assertEqual($l10n->language, 'English (Canadian)'); $this->assertEqual($l10n->languagePath, array('en_ca', 'eng', 'eng')); $this->assertEqual($l10n->locale, 'en_ca'); $_SERVER['HTTP_ACCEPT_LANGUAGE'] = 'es_mx'; $l10n->get(); $this->assertEqual($l10n->language, 'Spanish (Mexican)'); $this->assertEqual($l10n->languagePath, array('es_mx', 'spa', 'eng')); $this->assertEqual($l10n->locale, 'es_mx'); $_SERVER['HTTP_ACCEPT_LANGUAGE'] = 'en_xy,en_ca'; $l10n->get(); $this->assertEqual($l10n->language, 'English'); $this->assertEqual($l10n->languagePath, array('eng', 'eng', 'eng')); $this->assertEqual($l10n->locale, 'eng'); $_SERVER = $__SERVER; }
testGetAutoLanguage method @access public @return void
testGetAutoLanguage
php
Datawalke/Coordino
cake/tests/cases/libs/l10n.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/l10n.test.php
MIT
function testMap() { $l10n =& new L10n(); $result = $l10n->map(array('afr', 'af')); $expected = array('afr' => 'af', 'af' => 'afr'); $this->assertEqual($result, $expected); $result = $l10n->map(array('alb', 'sq')); $expected = array('alb' => 'sq', 'sq' => 'alb'); $this->assertEqual($result, $expected); $result = $l10n->map(array('ara', 'ar')); $expected = array('ara' => 'ar', 'ar' => 'ara'); $this->assertEqual($result, $expected); $result = $l10n->map(array('hye', 'hy')); $expected = array('hye' => 'hy', 'hy' => 'hye'); $this->assertEqual($result, $expected); $result = $l10n->map(array('baq', 'eu')); $expected = array('baq' => 'eu', 'eu' => 'baq'); $this->assertEqual($result, $expected); $result = $l10n->map(array('baq', 'eu')); $expected = array('baq' => 'eu', 'eu' => 'baq'); $this->assertEqual($result, $expected); $result = $l10n->map(array('bos', 'bs')); $expected = array('bos' => 'bs', 'bs' => 'bos'); $this->assertEqual($result, $expected); $result = $l10n->map(array('bul', 'bg')); $expected = array('bul' => 'bg', 'bg' => 'bul'); $this->assertEqual($result, $expected); $result = $l10n->map(array('bel', 'be')); $expected = array('bel' => 'be', 'be' => 'bel'); $this->assertEqual($result, $expected); $result = $l10n->map(array('cat', 'ca')); $expected = array('cat' => 'ca', 'ca' => 'cat'); $this->assertEqual($result, $expected); $result = $l10n->map(array('chi', 'zh')); $expected = array('chi' => 'zh', 'zh' => 'chi'); $this->assertEqual($result, $expected); $result = $l10n->map(array('zho', 'zh')); $expected = array('zho' => 'zh', 'zh' => 'chi'); $this->assertEqual($result, $expected); $result = $l10n->map(array('hrv', 'hr')); $expected = array('hrv' => 'hr', 'hr' => 'hrv'); $this->assertEqual($result, $expected); $result = $l10n->map(array('ces', 'cs')); $expected = array('ces' => 'cs', 'cs' => 'cze'); $this->assertEqual($result, $expected); $result = $l10n->map(array('cze', 'cs')); $expected = array('cze' => 'cs', 'cs' => 'cze'); $this->assertEqual($result, $expected); $result = $l10n->map(array('dan', 'da')); $expected = array('dan' => 'da', 'da' => 'dan'); $this->assertEqual($result, $expected); $result = $l10n->map(array('dut', 'nl')); $expected = array('dut' => 'nl', 'nl' => 'dut'); $this->assertEqual($result, $expected); $result = $l10n->map(array('nld', 'nl')); $expected = array('nld' => 'nl', 'nl' => 'dut'); $this->assertEqual($result, $expected); $result = $l10n->map(array('nld')); $expected = array('nld' => 'nl'); $this->assertEqual($result, $expected); $result = $l10n->map(array('eng', 'en')); $expected = array('eng' => 'en', 'en' => 'eng'); $this->assertEqual($result, $expected); $result = $l10n->map(array('est', 'et')); $expected = array('est' => 'et', 'et' => 'est'); $this->assertEqual($result, $expected); $result = $l10n->map(array('fao', 'fo')); $expected = array('fao' => 'fo', 'fo' => 'fao'); $this->assertEqual($result, $expected); $result = $l10n->map(array('fas', 'fa')); $expected = array('fas' => 'fa', 'fa' => 'fas'); $this->assertEqual($result, $expected); $result = $l10n->map(array('per', 'fa')); $expected = array('per' => 'fa', 'fa' => 'fas'); $this->assertEqual($result, $expected); $result = $l10n->map(array('fin', 'fi')); $expected = array('fin' => 'fi', 'fi' => 'fin'); $this->assertEqual($result, $expected); $result = $l10n->map(array('fra', 'fr')); $expected = array('fra' => 'fr', 'fr' => 'fre'); $this->assertEqual($result, $expected); $result = $l10n->map(array('fre', 'fr')); $expected = array('fre' => 'fr', 'fr' => 'fre'); $this->assertEqual($result, $expected); $result = $l10n->map(array('gla', 'gd')); $expected = array('gla' => 'gd', 'gd' => 'gla'); $this->assertEqual($result, $expected); $result = $l10n->map(array('glg', 'gl')); $expected = array('glg' => 'gl', 'gl' => 'glg'); $this->assertEqual($result, $expected); $result = $l10n->map(array('deu', 'de')); $expected = array('deu' => 'de', 'de' => 'deu'); $this->assertEqual($result, $expected); $result = $l10n->map(array('ger', 'de')); $expected = array('ger' => 'de', 'de' => 'deu'); $this->assertEqual($result, $expected); $result = $l10n->map(array('ell', 'el')); $expected = array('ell' => 'el', 'el' => 'gre'); $this->assertEqual($result, $expected); $result = $l10n->map(array('gre', 'el')); $expected = array('gre' => 'el', 'el' => 'gre'); $this->assertEqual($result, $expected); $result = $l10n->map(array('heb', 'he')); $expected = array('heb' => 'he', 'he' => 'heb'); $this->assertEqual($result, $expected); $result = $l10n->map(array('hin', 'hi')); $expected = array('hin' => 'hi', 'hi' => 'hin'); $this->assertEqual($result, $expected); $result = $l10n->map(array('hun', 'hu')); $expected = array('hun' => 'hu', 'hu' => 'hun'); $this->assertEqual($result, $expected); $result = $l10n->map(array('ice', 'is')); $expected = array('ice' => 'is', 'is' => 'ice'); $this->assertEqual($result, $expected); $result = $l10n->map(array('isl', 'is')); $expected = array('isl' => 'is', 'is' => 'ice'); $this->assertEqual($result, $expected); $result = $l10n->map(array('ind', 'id')); $expected = array('ind' => 'id', 'id' => 'ind'); $this->assertEqual($result, $expected); $result = $l10n->map(array('gle', 'ga')); $expected = array('gle' => 'ga', 'ga' => 'gle'); $this->assertEqual($result, $expected); $result = $l10n->map(array('ita', 'it')); $expected = array('ita' => 'it', 'it' => 'ita'); $this->assertEqual($result, $expected); $result = $l10n->map(array('jpn', 'ja')); $expected = array('jpn' => 'ja', 'ja' => 'jpn'); $this->assertEqual($result, $expected); $result = $l10n->map(array('kor', 'ko')); $expected = array('kor' => 'ko', 'ko' => 'kor'); $this->assertEqual($result, $expected); $result = $l10n->map(array('lav', 'lv')); $expected = array('lav' => 'lv', 'lv' => 'lav'); $this->assertEqual($result, $expected); $result = $l10n->map(array('lit', 'lt')); $expected = array('lit' => 'lt', 'lt' => 'lit'); $this->assertEqual($result, $expected); $result = $l10n->map(array('mac', 'mk')); $expected = array('mac' => 'mk', 'mk' => 'mac'); $this->assertEqual($result, $expected); $result = $l10n->map(array('mkd', 'mk')); $expected = array('mkd' => 'mk', 'mk' => 'mac'); $this->assertEqual($result, $expected); $result = $l10n->map(array('may', 'ms')); $expected = array('may' => 'ms', 'ms' => 'may'); $this->assertEqual($result, $expected); $result = $l10n->map(array('msa', 'ms')); $expected = array('msa' => 'ms', 'ms' => 'may'); $this->assertEqual($result, $expected); $result = $l10n->map(array('mlt', 'mt')); $expected = array('mlt' => 'mt', 'mt' => 'mlt'); $this->assertEqual($result, $expected); $result = $l10n->map(array('nor', 'no')); $expected = array('nor' => 'no', 'no' => 'nor'); $this->assertEqual($result, $expected); $result = $l10n->map(array('nob', 'nb')); $expected = array('nob' => 'nb', 'nb' => 'nob'); $this->assertEqual($result, $expected); $result = $l10n->map(array('nno', 'nn')); $expected = array('nno' => 'nn', 'nn' => 'nno'); $this->assertEqual($result, $expected); $result = $l10n->map(array('pol', 'pl')); $expected = array('pol' => 'pl', 'pl' => 'pol'); $this->assertEqual($result, $expected); $result = $l10n->map(array('por', 'pt')); $expected = array('por' => 'pt', 'pt' => 'por'); $this->assertEqual($result, $expected); $result = $l10n->map(array('roh', 'rm')); $expected = array('roh' => 'rm', 'rm' => 'roh'); $this->assertEqual($result, $expected); $result = $l10n->map(array('ron', 'ro')); $expected = array('ron' => 'ro', 'ro' => 'rum'); $this->assertEqual($result, $expected); $result = $l10n->map(array('rum', 'ro')); $expected = array('rum' => 'ro', 'ro' => 'rum'); $this->assertEqual($result, $expected); $result = $l10n->map(array('rus', 'ru')); $expected = array('rus' => 'ru', 'ru' => 'rus'); $this->assertEqual($result, $expected); $result = $l10n->map(array('smi', 'sz')); $expected = array('smi' => 'sz', 'sz' => 'smi'); $this->assertEqual($result, $expected); $result = $l10n->map(array('scc', 'sr')); $expected = array('scc' => 'sr', 'sr' => 'scc'); $this->assertEqual($result, $expected); $result = $l10n->map(array('srp', 'sr')); $expected = array('srp' => 'sr', 'sr' => 'scc'); $this->assertEqual($result, $expected); $result = $l10n->map(array('slk', 'sk')); $expected = array('slk' => 'sk', 'sk' => 'slo'); $this->assertEqual($result, $expected); $result = $l10n->map(array('slo', 'sk')); $expected = array('slo' => 'sk', 'sk' => 'slo'); $this->assertEqual($result, $expected); $result = $l10n->map(array('slv', 'sl')); $expected = array('slv' => 'sl', 'sl' => 'slv'); $this->assertEqual($result, $expected); $result = $l10n->map(array('wen', 'sb')); $expected = array('wen' => 'sb', 'sb' => 'wen'); $this->assertEqual($result, $expected); $result = $l10n->map(array('spa', 'es')); $expected = array('spa' => 'es', 'es' => 'spa'); $this->assertEqual($result, $expected); $result = $l10n->map(array('swe', 'sv')); $expected = array('swe' => 'sv', 'sv' => 'swe'); $this->assertEqual($result, $expected); $result = $l10n->map(array('tha', 'th')); $expected = array('tha' => 'th', 'th' => 'tha'); $this->assertEqual($result, $expected); $result = $l10n->map(array('tso', 'ts')); $expected = array('tso' => 'ts', 'ts' => 'tso'); $this->assertEqual($result, $expected); $result = $l10n->map(array('tsn', 'tn')); $expected = array('tsn' => 'tn', 'tn' => 'tsn'); $this->assertEqual($result, $expected); $result = $l10n->map(array('tur', 'tr')); $expected = array('tur' => 'tr', 'tr' => 'tur'); $this->assertEqual($result, $expected); $result = $l10n->map(array('ukr', 'uk')); $expected = array('ukr' => 'uk', 'uk' => 'ukr'); $this->assertEqual($result, $expected); $result = $l10n->map(array('urd', 'ur')); $expected = array('urd' => 'ur', 'ur' => 'urd'); $this->assertEqual($result, $expected); $result = $l10n->map(array('ven', 've')); $expected = array('ven' => 've', 've' => 'ven'); $this->assertEqual($result, $expected); $result = $l10n->map(array('vie', 'vi')); $expected = array('vie' => 'vi', 'vi' => 'vie'); $this->assertEqual($result, $expected); $result = $l10n->map(array('xho', 'xh')); $expected = array('xho' => 'xh', 'xh' => 'xho'); $this->assertEqual($result, $expected); $result = $l10n->map(array('cy', 'cym')); $expected = array('cym' => 'cy', 'cy' => 'cym'); $this->assertEqual($result, $expected); $result = $l10n->map(array('yid', 'yi')); $expected = array('yid' => 'yi', 'yi' => 'yid'); $this->assertEqual($result, $expected); $result = $l10n->map(array('zul', 'zu')); $expected = array('zul' => 'zu', 'zu' => 'zul'); $this->assertEqual($result, $expected); }
testMap method @access public @return void
testMap
php
Datawalke/Coordino
cake/tests/cases/libs/l10n.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/l10n.test.php
MIT
function testCatalog() { $l10n =& new L10n(); $result = $l10n->catalog(array('af')); $expected = array( 'af' => array('language' => 'Afrikaans', 'locale' => 'afr', 'localeFallback' => 'afr', 'charset' => 'utf-8', 'direction' => 'ltr') ); $this->assertEqual($result, $expected); $result = $l10n->catalog(array('ar', 'ar-ae', 'ar-bh', 'ar-dz', 'ar-eg', 'ar-iq', 'ar-jo', 'ar-kw', 'ar-lb', 'ar-ly', 'ar-ma', 'ar-om', 'ar-qa', 'ar-sa', 'ar-sy', 'ar-tn', 'ar-ye')); $expected = array( 'ar' => array('language' => 'Arabic', 'locale' => 'ara', 'localeFallback' => 'ara', 'charset' => 'utf-8', 'direction' => 'rtl'), 'ar-ae' => array('language' => 'Arabic (U.A.E.)', 'locale' => 'ar_ae', 'localeFallback' => 'ara', 'charset' => 'utf-8', 'direction' => 'rtl'), 'ar-bh' => array('language' => 'Arabic (Bahrain)', 'locale' => 'ar_bh', 'localeFallback' => 'ara', 'charset' => 'utf-8', 'direction' => 'rtl'), 'ar-dz' => array('language' => 'Arabic (Algeria)', 'locale' => 'ar_dz', 'localeFallback' => 'ara', 'charset' => 'utf-8', 'direction' => 'rtl'), 'ar-eg' => array('language' => 'Arabic (Egypt)', 'locale' => 'ar_eg', 'localeFallback' => 'ara', 'charset' => 'utf-8', 'direction' => 'rtl'), 'ar-iq' => array('language' => 'Arabic (Iraq)', 'locale' => 'ar_iq', 'localeFallback' => 'ara', 'charset' => 'utf-8', 'direction' => 'rtl'), 'ar-jo' => array('language' => 'Arabic (Jordan)', 'locale' => 'ar_jo', 'localeFallback' => 'ara', 'charset' => 'utf-8', 'direction' => 'rtl'), 'ar-kw' => array('language' => 'Arabic (Kuwait)', 'locale' => 'ar_kw', 'localeFallback' => 'ara', 'charset' => 'utf-8', 'direction' => 'rtl'), 'ar-lb' => array('language' => 'Arabic (Lebanon)', 'locale' => 'ar_lb', 'localeFallback' => 'ara', 'charset' => 'utf-8', 'direction' => 'rtl'), 'ar-ly' => array('language' => 'Arabic (Libya)', 'locale' => 'ar_ly', 'localeFallback' => 'ara', 'charset' => 'utf-8', 'direction' => 'rtl'), 'ar-ma' => array('language' => 'Arabic (Morocco)', 'locale' => 'ar_ma', 'localeFallback' => 'ara', 'charset' => 'utf-8', 'direction' => 'rtl'), 'ar-om' => array('language' => 'Arabic (Oman)', 'locale' => 'ar_om', 'localeFallback' => 'ara', 'charset' => 'utf-8', 'direction' => 'rtl'), 'ar-qa' => array('language' => 'Arabic (Qatar)', 'locale' => 'ar_qa', 'localeFallback' => 'ara', 'charset' => 'utf-8', 'direction' => 'rtl'), 'ar-sa' => array('language' => 'Arabic (Saudi Arabia)', 'locale' => 'ar_sa', 'localeFallback' => 'ara', 'charset' => 'utf-8', 'direction' => 'rtl'), 'ar-sy' => array('language' => 'Arabic (Syria)', 'locale' => 'ar_sy', 'localeFallback' => 'ara', 'charset' => 'utf-8', 'direction' => 'rtl'), 'ar-tn' => array('language' => 'Arabic (Tunisia)', 'locale' => 'ar_tn', 'localeFallback' => 'ara', 'charset' => 'utf-8', 'direction' => 'rtl'), 'ar-ye' => array('language' => 'Arabic (Yemen)', 'locale' => 'ar_ye', 'localeFallback' => 'ara', 'charset' => 'utf-8', 'direction' => 'rtl') ); $this->assertEqual($result, $expected); $result = $l10n->catalog(array('be')); $expected = array( 'be' => array('language' => 'Byelorussian', 'locale' => 'bel', 'localeFallback' => 'bel', 'charset' => 'utf-8', 'direction' => 'ltr') ); $this->assertEqual($result, $expected); $result = $l10n->catalog(array('bg')); $expected = array( 'bg' => array('language' => 'Bulgarian', 'locale' => 'bul', 'localeFallback' => 'bul', 'charset' => 'utf-8', 'direction' => 'ltr') ); $this->assertEqual($result, $expected); $result = $l10n->catalog(array('bs')); $expected = array( 'bs' => array('language' => 'Bosnian', 'locale' => 'bos', 'localeFallback' => 'bos', 'charset' => 'utf-8', 'direction' => 'ltr') ); $this->assertEqual($result, $expected); $result = $l10n->catalog(array('ca')); $expected = array( 'ca' => array('language' => 'Catalan', 'locale' => 'cat', 'localeFallback' => 'cat', 'charset' => 'utf-8', 'direction' => 'ltr') ); $this->assertEqual($result, $expected); $result = $l10n->catalog(array('cs')); $expected = array( 'cs' => array('language' => 'Czech', 'locale' => 'cze', 'localeFallback' => 'cze', 'charset' => 'utf-8', 'direction' => 'ltr') ); $this->assertEqual($result, $expected); $result = $l10n->catalog(array('da')); $expected = array( 'da' => array('language' => 'Danish', 'locale' => 'dan', 'localeFallback' => 'dan', 'charset' => 'utf-8', 'direction' => 'ltr') ); $this->assertEqual($result, $expected); $result = $l10n->catalog(array('de', 'de-at', 'de-ch', 'de-de', 'de-li', 'de-lu')); $expected = array( 'de' => array('language' => 'German (Standard)', 'locale' => 'deu', 'localeFallback' => 'deu', 'charset' => 'utf-8', 'direction' => 'ltr'), 'de-at' => array('language' => 'German (Austria)', 'locale' => 'de_at', 'localeFallback' => 'deu', 'charset' => 'utf-8', 'direction' => 'ltr'), 'de-ch' => array('language' => 'German (Swiss)', 'locale' => 'de_ch', 'localeFallback' => 'deu', 'charset' => 'utf-8', 'direction' => 'ltr'), 'de-de' => array('language' => 'German (Germany)', 'locale' => 'de_de', 'localeFallback' => 'deu', 'charset' => 'utf-8', 'direction' => 'ltr'), 'de-li' => array('language' => 'German (Liechtenstein)', 'locale' => 'de_li', 'localeFallback' => 'deu', 'charset' => 'utf-8', 'direction' => 'ltr'), 'de-lu' => array('language' => 'German (Luxembourg)', 'locale' => 'de_lu', 'localeFallback' => 'deu', 'charset' => 'utf-8', 'direction' => 'ltr') ); $this->assertEqual($result, $expected); $result = $l10n->catalog(array('e', 'el')); $expected = array( 'e' => array('language' => 'Greek', 'locale' => 'gre', 'localeFallback' => 'gre', 'charset' => 'utf-8', 'direction' => 'ltr'), 'el' => array('language' => 'Greek', 'locale' => 'gre', 'localeFallback' => 'gre', 'charset' => 'utf-8', 'direction' => 'ltr') ); $this->assertEqual($result, $expected); $result = $l10n->catalog(array('en', 'en-au', 'en-bz', 'en-ca', 'en-gb', 'en-ie', 'en-jm', 'en-nz', 'en-tt', 'en-us', 'en-za')); $expected = array( 'en' => array('language' => 'English', 'locale' => 'eng', 'localeFallback' => 'eng', 'charset' => 'utf-8', 'direction' => 'ltr'), 'en-au' => array('language' => 'English (Australian)', 'locale' => 'en_au', 'localeFallback' => 'eng', 'charset' => 'utf-8', 'direction' => 'ltr'), 'en-bz' => array('language' => 'English (Belize)', 'locale' => 'en_bz', 'localeFallback' => 'eng', 'charset' => 'utf-8', 'direction' => 'ltr'), 'en-ca' => array('language' => 'English (Canadian)', 'locale' => 'en_ca', 'localeFallback' => 'eng', 'charset' => 'utf-8', 'direction' => 'ltr'), 'en-gb' => array('language' => 'English (British)', 'locale' => 'en_gb', 'localeFallback' => 'eng', 'charset' => 'utf-8', 'direction' => 'ltr'), 'en-ie' => array('language' => 'English (Ireland)', 'locale' => 'en_ie', 'localeFallback' => 'eng', 'charset' => 'utf-8', 'direction' => 'ltr'), 'en-jm' => array('language' => 'English (Jamaica)', 'locale' => 'en_jm', 'localeFallback' => 'eng', 'charset' => 'utf-8', 'direction' => 'ltr'), 'en-nz' => array('language' => 'English (New Zealand)', 'locale' => 'en_nz', 'localeFallback' => 'eng', 'charset' => 'utf-8', 'direction' => 'ltr'), 'en-tt' => array('language' => 'English (Trinidad)', 'locale' => 'en_tt', 'localeFallback' => 'eng', 'charset' => 'utf-8', 'direction' => 'ltr'), 'en-us' => array('language' => 'English (United States)', 'locale' => 'en_us', 'localeFallback' => 'eng', 'charset' => 'utf-8', 'direction' => 'ltr'), 'en-za' => array('language' => 'English (South Africa)', 'locale' => 'en_za', 'localeFallback' => 'eng', 'charset' => 'utf-8', 'direction' => 'ltr') ); $this->assertEqual($result, $expected); $result = $l10n->catalog(array('es', 'es-ar', 'es-bo', 'es-cl', 'es-co', 'es-cr', 'es-do', 'es-ec', 'es-es', 'es-gt', 'es-hn', 'es-mx', 'es-ni', 'es-pa', 'es-pe', 'es-pr', 'es-py', 'es-sv', 'es-uy', 'es-ve')); $expected = array( 'es' => array('language' => 'Spanish (Spain - Traditional)', 'locale' => 'spa', 'localeFallback' => 'spa', 'charset' => 'utf-8', 'direction' => 'ltr'), 'es-ar' => array('language' => 'Spanish (Argentina)', 'locale' => 'es_ar', 'localeFallback' => 'spa', 'charset' => 'utf-8', 'direction' => 'ltr'), 'es-bo' => array('language' => 'Spanish (Bolivia)', 'locale' => 'es_bo', 'localeFallback' => 'spa', 'charset' => 'utf-8', 'direction' => 'ltr'), 'es-cl' => array('language' => 'Spanish (Chile)', 'locale' => 'es_cl', 'localeFallback' => 'spa', 'charset' => 'utf-8', 'direction' => 'ltr'), 'es-co' => array('language' => 'Spanish (Colombia)', 'locale' => 'es_co', 'localeFallback' => 'spa', 'charset' => 'utf-8', 'direction' => 'ltr'), 'es-cr' => array('language' => 'Spanish (Costa Rica)', 'locale' => 'es_cr', 'localeFallback' => 'spa', 'charset' => 'utf-8', 'direction' => 'ltr'), 'es-do' => array('language' => 'Spanish (Dominican Republic)', 'locale' => 'es_do', 'localeFallback' => 'spa', 'charset' => 'utf-8', 'direction' => 'ltr'), 'es-ec' => array('language' => 'Spanish (Ecuador)', 'locale' => 'es_ec', 'localeFallback' => 'spa', 'charset' => 'utf-8', 'direction' => 'ltr'), 'es-es' => array('language' => 'Spanish (Spain)', 'locale' => 'es_es', 'localeFallback' => 'spa', 'charset' => 'utf-8', 'direction' => 'ltr'), 'es-gt' => array('language' => 'Spanish (Guatemala)', 'locale' => 'es_gt', 'localeFallback' => 'spa', 'charset' => 'utf-8', 'direction' => 'ltr'), 'es-hn' => array('language' => 'Spanish (Honduras)', 'locale' => 'es_hn', 'localeFallback' => 'spa', 'charset' => 'utf-8', 'direction' => 'ltr'), 'es-mx' => array('language' => 'Spanish (Mexican)', 'locale' => 'es_mx', 'localeFallback' => 'spa', 'charset' => 'utf-8', 'direction' => 'ltr'), 'es-ni' => array('language' => 'Spanish (Nicaragua)', 'locale' => 'es_ni', 'localeFallback' => 'spa', 'charset' => 'utf-8', 'direction' => 'ltr'), 'es-pa' => array('language' => 'Spanish (Panama)', 'locale' => 'es_pa', 'localeFallback' => 'spa', 'charset' => 'utf-8', 'direction' => 'ltr'), 'es-pe' => array('language' => 'Spanish (Peru)', 'locale' => 'es_pe', 'localeFallback' => 'spa', 'charset' => 'utf-8', 'direction' => 'ltr'), 'es-pr' => array('language' => 'Spanish (Puerto Rico)', 'locale' => 'es_pr', 'localeFallback' => 'spa', 'charset' => 'utf-8', 'direction' => 'ltr'), 'es-py' => array('language' => 'Spanish (Paraguay)', 'locale' => 'es_py', 'localeFallback' => 'spa', 'charset' => 'utf-8', 'direction' => 'ltr'), 'es-sv' => array('language' => 'Spanish (El Salvador)', 'locale' => 'es_sv', 'localeFallback' => 'spa', 'charset' => 'utf-8', 'direction' => 'ltr'), 'es-uy' => array('language' => 'Spanish (Uruguay)', 'locale' => 'es_uy', 'localeFallback' => 'spa', 'charset' => 'utf-8', 'direction' => 'ltr'), 'es-ve' => array('language' => 'Spanish (Venezuela)', 'locale' => 'es_ve', 'localeFallback' => 'spa', 'charset' => 'utf-8', 'direction' => 'ltr') ); $this->assertEqual($result, $expected); $result = $l10n->catalog(array('et')); $expected = array( 'et' => array('language' => 'Estonian', 'locale' => 'est', 'localeFallback' => 'est', 'charset' => 'utf-8', 'direction' => 'ltr') ); $this->assertEqual($result, $expected); $result = $l10n->catalog(array('eu')); $expected = array( 'eu' => array('language' => 'Basque', 'locale' => 'baq', 'localeFallback' => 'baq', 'charset' => 'utf-8', 'direction' => 'ltr') ); $this->assertEqual($result, $expected); $result = $l10n->catalog(array('fa')); $expected = array( 'fa' => array('language' => 'Farsi', 'locale' => 'per', 'localeFallback' => 'per', 'charset' => 'utf-8', 'direction' => 'rtl') ); $this->assertEqual($result, $expected); $result = $l10n->catalog(array('fi')); $expected = array( 'fi' => array('language' => 'Finnish', 'locale' => 'fin', 'localeFallback' => 'fin', 'charset' => 'utf-8', 'direction' => 'ltr') ); $this->assertEqual($result, $expected); $result = $l10n->catalog(array('fo')); $expected = array( 'fo' => array('language' => 'Faeroese', 'locale' => 'fao', 'localeFallback' => 'fao', 'charset' => 'utf-8', 'direction' => 'ltr') ); $this->assertEqual($result, $expected); $result = $l10n->catalog(array('fr', 'fr-be', 'fr-ca', 'fr-ch', 'fr-fr', 'fr-lu')); $expected = array( 'fr' => array('language' => 'French (Standard)', 'locale' => 'fre', 'localeFallback' => 'fre', 'charset' => 'utf-8', 'direction' => 'ltr'), 'fr-be' => array('language' => 'French (Belgium)', 'locale' => 'fr_be', 'localeFallback' => 'fre', 'charset' => 'utf-8', 'direction' => 'ltr'), 'fr-ca' => array('language' => 'French (Canadian)', 'locale' => 'fr_ca', 'localeFallback' => 'fre', 'charset' => 'utf-8', 'direction' => 'ltr'), 'fr-ch' => array('language' => 'French (Swiss)', 'locale' => 'fr_ch', 'localeFallback' => 'fre', 'charset' => 'utf-8', 'direction' => 'ltr'), 'fr-fr' => array('language' => 'French (France)', 'locale' => 'fr_fr', 'localeFallback' => 'fre', 'charset' => 'utf-8', 'direction' => 'ltr'), 'fr-lu' => array('language' => 'French (Luxembourg)', 'locale' => 'fr_lu', 'localeFallback' => 'fre', 'charset' => 'utf-8', 'direction' => 'ltr') ); $this->assertEqual($result, $expected); $result = $l10n->catalog(array('ga')); $expected = array( 'ga' => array('language' => 'Irish', 'locale' => 'gle', 'localeFallback' => 'gle', 'charset' => 'utf-8', 'direction' => 'ltr') ); $this->assertEqual($result, $expected); $result = $l10n->catalog(array('gd', 'gd-ie')); $expected = array( 'gd' => array('language' => 'Gaelic (Scots)', 'locale' => 'gla', 'localeFallback' => 'gla', 'charset' => 'utf-8', 'direction' => 'ltr'), 'gd-ie' => array('language' => 'Gaelic (Irish)', 'locale' => 'gd_ie', 'localeFallback' => 'gla', 'charset' => 'utf-8', 'direction' => 'ltr') ); $this->assertEqual($result, $expected); $result = $l10n->catalog(array('gl')); $expected = array( 'gl' => array('language' => 'Galician', 'locale' => 'glg', 'localeFallback' => 'glg', 'charset' => 'utf-8', 'direction' => 'ltr') ); $this->assertEqual($result, $expected); $result = $l10n->catalog(array('he')); $expected = array( 'he' => array('language' => 'Hebrew', 'locale' => 'heb', 'localeFallback' => 'heb', 'charset' => 'utf-8', 'direction' => 'rtl') ); $this->assertEqual($result, $expected); $result = $l10n->catalog(array('hi')); $expected = array( 'hi' => array('language' => 'Hindi', 'locale' => 'hin', 'localeFallback' => 'hin', 'charset' => 'utf-8', 'direction' => 'ltr') ); $this->assertEqual($result, $expected); $result = $l10n->catalog(array('hr')); $expected = array( 'hr' => array('language' => 'Croatian', 'locale' => 'hrv', 'localeFallback' => 'hrv', 'charset' => 'utf-8', 'direction' => 'ltr') ); $this->assertEqual($result, $expected); $result = $l10n->catalog(array('hu')); $expected = array( 'hu' => array('language' => 'Hungarian', 'locale' => 'hun', 'localeFallback' => 'hun', 'charset' => 'utf-8', 'direction' => 'ltr') ); $this->assertEqual($result, $expected); $result = $l10n->catalog(array('hy')); $expected = array( 'hy' => array('language' => 'Armenian - Armenia', 'locale' => 'hye', 'localeFallback' => 'hye', 'charset' => 'utf-8', 'direction' => 'ltr') ); $this->assertEqual($result, $expected); $result = $l10n->catalog(array('id', 'in')); $expected = array( 'id' => array('language' => 'Indonesian', 'locale' => 'ind', 'localeFallback' => 'ind', 'charset' => 'utf-8', 'direction' => 'ltr'), 'in' => array('language' => 'Indonesian', 'locale' => 'ind', 'localeFallback' => 'ind', 'charset' => 'utf-8', 'direction' => 'ltr') ); $this->assertEqual($result, $expected); $result = $l10n->catalog(array('is')); $expected = array( 'is' => array('language' => 'Icelandic', 'locale' => 'ice', 'localeFallback' => 'ice', 'charset' => 'utf-8', 'direction' => 'ltr') ); $this->assertEqual($result, $expected); $result = $l10n->catalog(array('it', 'it-ch')); $expected = array( 'it' => array('language' => 'Italian', 'locale' => 'ita', 'localeFallback' => 'ita', 'charset' => 'utf-8', 'direction' => 'ltr'), 'it-ch' => array('language' => 'Italian (Swiss) ', 'locale' => 'it_ch', 'localeFallback' => 'ita', 'charset' => 'utf-8', 'direction' => 'ltr') ); $this->assertEqual($result, $expected); $result = $l10n->catalog(array('ja')); $expected = array( 'ja' => array('language' => 'Japanese', 'locale' => 'jpn', 'localeFallback' => 'jpn', 'charset' => 'utf-8', 'direction' => 'ltr') ); $this->assertEqual($result, $expected); $result = $l10n->catalog(array('ko', 'ko-kp', 'ko-kr')); $expected = array( 'ko' => array('language' => 'Korean', 'locale' => 'kor', 'localeFallback' => 'kor', 'charset' => 'kr', 'direction' => 'ltr'), 'ko-kp' => array('language' => 'Korea (North)', 'locale' => 'ko_kp', 'localeFallback' => 'kor', 'charset' => 'kr', 'direction' => 'ltr'), 'ko-kr' => array('language' => 'Korea (South)', 'locale' => 'ko_kr', 'localeFallback' => 'kor', 'charset' => 'kr', 'direction' => 'ltr') ); $this->assertEqual($result, $expected); $result = $l10n->catalog(array('koi8-r', 'ru', 'ru-mo')); $expected = array( 'koi8-r' => array('language' => 'Russian', 'locale' => 'koi8_r', 'localeFallback' => 'rus', 'charset' => 'koi8-r', 'direction' => 'ltr'), 'ru' => array('language' => 'Russian', 'locale' => 'rus', 'localeFallback' => 'rus', 'charset' => 'utf-8', 'direction' => 'ltr'), 'ru-mo' => array('language' => 'Russian (Moldavia)', 'locale' => 'ru_mo', 'localeFallback' => 'rus', 'charset' => 'utf-8', 'direction' => 'ltr') ); $this->assertEqual($result, $expected); $result = $l10n->catalog(array('lt')); $expected = array( 'lt' => array('language' => 'Lithuanian', 'locale' => 'lit', 'localeFallback' => 'lit', 'charset' => 'utf-8', 'direction' => 'ltr') ); $this->assertEqual($result, $expected); $result = $l10n->catalog(array('lv')); $expected = array( 'lv' => array('language' => 'Latvian', 'locale' => 'lav', 'localeFallback' => 'lav', 'charset' => 'utf-8', 'direction' => 'ltr') ); $this->assertEqual($result, $expected); $result = $l10n->catalog(array('mk', 'mk-mk')); $expected = array( 'mk' => array('language' => 'FYRO Macedonian', 'locale' => 'mk', 'localeFallback' => 'mac', 'charset' => 'utf-8', 'direction' => 'ltr'), 'mk-mk' => array('language' => 'Macedonian', 'locale' => 'mk_mk', 'localeFallback' => 'mac', 'charset' => 'utf-8', 'direction' => 'ltr') ); $this->assertEqual($result, $expected); $result = $l10n->catalog(array('ms')); $expected = array( 'ms' => array('language' => 'Malaysian', 'locale' => 'may', 'localeFallback' => 'may', 'charset' => 'utf-8', 'direction' => 'ltr') ); $this->assertEqual($result, $expected); $result = $l10n->catalog(array('mt')); $expected = array( 'mt' => array('language' => 'Maltese', 'locale' => 'mlt', 'localeFallback' => 'mlt', 'charset' => 'utf-8', 'direction' => 'ltr') ); $this->assertEqual($result, $expected); $result = $l10n->catalog(array('n', 'nl', 'nl-be')); $expected = array( 'n' => array('language' => 'Dutch (Standard)', 'locale' => 'dut', 'localeFallback' => 'dut', 'charset' => 'utf-8', 'direction' => 'ltr'), 'nl' => array('language' => 'Dutch (Standard)', 'locale' => 'dut', 'localeFallback' => 'dut', 'charset' => 'utf-8', 'direction' => 'ltr'), 'nl-be' => array('language' => 'Dutch (Belgium)', 'locale' => 'nl_be', 'localeFallback' => 'dut', 'charset' => 'utf-8', 'direction' => 'ltr') ); $this->assertEqual($result, $expected); $result = $l10n->catalog('nl'); $expected = array('language' => 'Dutch (Standard)', 'locale' => 'dut', 'localeFallback' => 'dut', 'charset' => 'utf-8', 'direction' => 'ltr'); $this->assertEqual($result, $expected); $result = $l10n->catalog('nld'); $expected = array('language' => 'Dutch (Standard)', 'locale' => 'dut', 'localeFallback' => 'dut', 'charset' => 'utf-8', 'direction' => 'ltr'); $this->assertEqual($result, $expected); $result = $l10n->catalog('dut'); $expected = array('language' => 'Dutch (Standard)', 'locale' => 'dut', 'localeFallback' => 'dut', 'charset' => 'utf-8', 'direction' => 'ltr'); $this->assertEqual($result, $expected); $result = $l10n->catalog(array('nb')); $expected = array( 'nb' => array('language' => 'Norwegian Bokmal', 'locale' => 'nob', 'localeFallback' => 'nor', 'charset' => 'utf-8', 'direction' => 'ltr') ); $this->assertEqual($result, $expected); $result = $l10n->catalog(array('nn', 'no')); $expected = array( 'nn' => array('language' => 'Norwegian Nynorsk', 'locale' => 'nno', 'localeFallback' => 'nor', 'charset' => 'utf-8', 'direction' => 'ltr'), 'no' => array('language' => 'Norwegian', 'locale' => 'nor', 'localeFallback' => 'nor', 'charset' => 'utf-8', 'direction' => 'ltr') ); $this->assertEqual($result, $expected); $result = $l10n->catalog(array('p', 'pl')); $expected = array( 'p' => array('language' => 'Polish', 'locale' => 'pol', 'localeFallback' => 'pol', 'charset' => 'utf-8', 'direction' => 'ltr'), 'pl' => array('language' => 'Polish', 'locale' => 'pol', 'localeFallback' => 'pol', 'charset' => 'utf-8', 'direction' => 'ltr') ); $this->assertEqual($result, $expected); $result = $l10n->catalog(array('pt', 'pt-br')); $expected = array( 'pt' => array('language' => 'Portuguese (Portugal)', 'locale' => 'por', 'localeFallback' => 'por', 'charset' => 'utf-8', 'direction' => 'ltr'), 'pt-br' => array('language' => 'Portuguese (Brazil)', 'locale' => 'pt_br', 'localeFallback' => 'por', 'charset' => 'utf-8', 'direction' => 'ltr') ); $this->assertEqual($result, $expected); $result = $l10n->catalog(array('rm')); $expected = array( 'rm' => array('language' => 'Rhaeto-Romanic', 'locale' => 'roh', 'localeFallback' => 'roh', 'charset' => 'utf-8', 'direction' => 'ltr') ); $this->assertEqual($result, $expected); $result = $l10n->catalog(array('ro', 'ro-mo')); $expected = array( 'ro' => array('language' => 'Romanian', 'locale' => 'rum', 'localeFallback' => 'rum', 'charset' => 'utf-8', 'direction' => 'ltr'), 'ro-mo' => array('language' => 'Romanian (Moldavia)', 'locale' => 'ro_mo', 'localeFallback' => 'rum', 'charset' => 'utf-8', 'direction' => 'ltr') ); $this->assertEqual($result, $expected); $result = $l10n->catalog(array('sb')); $expected = array( 'sb' => array('language' => 'Sorbian', 'locale' => 'wen', 'localeFallback' => 'wen', 'charset' => 'utf-8', 'direction' => 'ltr') ); $this->assertEqual($result, $expected); $result = $l10n->catalog(array('sk')); $expected = array( 'sk' => array('language' => 'Slovak', 'locale' => 'slo', 'localeFallback' => 'slo', 'charset' => 'utf-8', 'direction' => 'ltr') ); $this->assertEqual($result, $expected); $result = $l10n->catalog(array('sl')); $expected = array( 'sl' => array('language' => 'Slovenian', 'locale' => 'slv', 'localeFallback' => 'slv', 'charset' => 'utf-8', 'direction' => 'ltr') ); $this->assertEqual($result, $expected); $result = $l10n->catalog(array('sq')); $expected = array( 'sq' => array('language' => 'Albanian', 'locale' => 'alb', 'localeFallback' => 'alb', 'charset' => 'utf-8', 'direction' => 'ltr') ); $this->assertEqual($result, $expected); $result = $l10n->catalog(array('sr')); $expected = array( 'sr' => array('language' => 'Serbian', 'locale' => 'scc', 'localeFallback' => 'scc', 'charset' => 'utf-8', 'direction' => 'ltr') ); $this->assertEqual($result, $expected); $result = $l10n->catalog(array('sv', 'sv-fi')); $expected = array( 'sv' => array('language' => 'Swedish', 'locale' => 'swe', 'localeFallback' => 'swe', 'charset' => 'utf-8', 'direction' => 'ltr'), 'sv-fi' => array('language' => 'Swedish (Finland)', 'locale' => 'sv_fi', 'localeFallback' => 'swe', 'charset' => 'utf-8', 'direction' => 'ltr') ); $this->assertEqual($result, $expected); $result = $l10n->catalog(array('sx')); $expected = array( 'sx' => array('language' => 'Sutu', 'locale' => 'sx', 'localeFallback' => 'sx', 'charset' => 'utf-8', 'direction' => 'ltr') ); $this->assertEqual($result, $expected); $result = $l10n->catalog(array('sz')); $expected = array( 'sz' => array('language' => 'Sami (Lappish)', 'locale' => 'smi', 'localeFallback' => 'smi', 'charset' => 'utf-8', 'direction' => 'ltr') ); $this->assertEqual($result, $expected); $result = $l10n->catalog(array('th')); $expected = array( 'th' => array('language' => 'Thai', 'locale' => 'tha', 'localeFallback' => 'tha', 'charset' => 'utf-8', 'direction' => 'ltr') ); $this->assertEqual($result, $expected); $result = $l10n->catalog(array('tn')); $expected = array( 'tn' => array('language' => 'Tswana', 'locale' => 'tsn', 'localeFallback' => 'tsn', 'charset' => 'utf-8', 'direction' => 'ltr') ); $this->assertEqual($result, $expected); $result = $l10n->catalog(array('tr')); $expected = array( 'tr' => array('language' => 'Turkish', 'locale' => 'tur', 'localeFallback' => 'tur', 'charset' => 'utf-8', 'direction' => 'ltr') ); $this->assertEqual($result, $expected); $result = $l10n->catalog(array('ts')); $expected = array( 'ts' => array('language' => 'Tsonga', 'locale' => 'tso', 'localeFallback' => 'tso', 'charset' => 'utf-8', 'direction' => 'ltr') ); $this->assertEqual($result, $expected); $result = $l10n->catalog(array('uk')); $expected = array( 'uk' => array('language' => 'Ukrainian', 'locale' => 'ukr', 'localeFallback' => 'ukr', 'charset' => 'utf-8', 'direction' => 'ltr') ); $this->assertEqual($result, $expected); $result = $l10n->catalog(array('ur')); $expected = array( 'ur' => array('language' => 'Urdu', 'locale' => 'urd', 'localeFallback' => 'urd', 'charset' => 'utf-8', 'direction' => 'rtl') ); $this->assertEqual($result, $expected); $result = $l10n->catalog(array('ve')); $expected = array( 've' => array('language' => 'Venda', 'locale' => 'ven', 'localeFallback' => 'ven', 'charset' => 'utf-8', 'direction' => 'ltr') ); $this->assertEqual($result, $expected); $result = $l10n->catalog(array('vi')); $expected = array( 'vi' => array('language' => 'Vietnamese', 'locale' => 'vie', 'localeFallback' => 'vie', 'charset' => 'utf-8', 'direction' => 'ltr') ); $this->assertEqual($result, $expected); $result = $l10n->catalog(array('cy')); $expected = array( 'cy' => array('language' => 'Welsh', 'locale' => 'cym', 'localeFallback' => 'cym', 'charset' => 'utf-8', 'direction' => 'ltr') ); $this->assertEqual($result, $expected); $result = $l10n->catalog(array('xh')); $expected = array( 'xh' => array('language' => 'Xhosa', 'locale' => 'xho', 'localeFallback' => 'xho', 'charset' => 'utf-8', 'direction' => 'ltr') ); $this->assertEqual($result, $expected); $result = $l10n->catalog(array('yi')); $expected = array( 'yi' => array('language' => 'Yiddish', 'locale' => 'yid', 'localeFallback' => 'yid', 'charset' => 'utf-8', 'direction' => 'ltr') ); $this->assertEqual($result, $expected); $result = $l10n->catalog(array('zh', 'zh-cn', 'zh-hk', 'zh-sg', 'zh-tw')); $expected = array( 'zh' => array('language' => 'Chinese', 'locale' => 'chi', 'localeFallback' => 'chi', 'charset' => 'utf-8', 'direction' => 'ltr'), 'zh-cn' => array('language' => 'Chinese (PRC)', 'locale' => 'zh_cn', 'localeFallback' => 'chi', 'charset' => 'GB2312', 'direction' => 'ltr'), 'zh-hk' => array('language' => 'Chinese (Hong Kong)', 'locale' => 'zh_hk', 'localeFallback' => 'chi', 'charset' => 'utf-8', 'direction' => 'ltr'), 'zh-sg' => array('language' => 'Chinese (Singapore)', 'locale' => 'zh_sg', 'localeFallback' => 'chi', 'charset' => 'utf-8', 'direction' => 'ltr'), 'zh-tw' => array('language' => 'Chinese (Taiwan)', 'locale' => 'zh_tw', 'localeFallback' => 'chi', 'charset' => 'utf-8', 'direction' => 'ltr') ); $this->assertEqual($result, $expected); $result = $l10n->catalog(array('zu')); $expected = array( 'zu' => array('language' => 'Zulu', 'locale' => 'zul', 'localeFallback' => 'zul', 'charset' => 'utf-8', 'direction' => 'ltr') ); $this->assertEqual($result, $expected); $result = $l10n->catalog(array('en-nz', 'es-do', 'sz', 'ar-lb', 'zh-hk', 'pt-br')); $expected = array( 'en-nz' => array('language' => 'English (New Zealand)', 'locale' => 'en_nz', 'localeFallback' => 'eng', 'charset' => 'utf-8', 'direction' => 'ltr'), 'es-do' => array('language' => 'Spanish (Dominican Republic)', 'locale' => 'es_do', 'localeFallback' => 'spa', 'charset' => 'utf-8', 'direction' => 'ltr'), 'sz' => array('language' => 'Sami (Lappish)', 'locale' => 'smi', 'localeFallback' => 'smi', 'charset' => 'utf-8', 'direction' => 'ltr'), 'ar-lb' => array('language' => 'Arabic (Lebanon)', 'locale' => 'ar_lb', 'localeFallback' => 'ara', 'charset' => 'utf-8', 'direction' => 'rtl'), 'zh-hk' => array('language' => 'Chinese (Hong Kong)', 'locale' => 'zh_hk', 'localeFallback' => 'chi', 'charset' => 'utf-8', 'direction' => 'ltr'), 'pt-br' => array('language' => 'Portuguese (Brazil)', 'locale' => 'pt_br', 'localeFallback' => 'por', 'charset' => 'utf-8', 'direction' => 'ltr') ); $this->assertEqual($result, $expected); $result = $l10n->catalog(array('eng', 'deu', 'zho', 'rum', 'zul', 'yid')); $expected = array( 'eng' => array('language' => 'English', 'locale' => 'eng', 'localeFallback' => 'eng', 'charset' => 'utf-8', 'direction' => 'ltr'), 'deu' => array('language' => 'German (Standard)', 'locale' => 'deu', 'localeFallback' => 'deu', 'charset' => 'utf-8', 'direction' => 'ltr'), 'zho' => array('language' => 'Chinese', 'locale' => 'chi', 'localeFallback' => 'chi', 'charset' => 'utf-8', 'direction' => 'ltr'), 'rum' => array('language' => 'Romanian', 'locale' => 'rum', 'localeFallback' => 'rum', 'charset' => 'utf-8', 'direction' => 'ltr'), 'zul' => array('language' => 'Zulu', 'locale' => 'zul', 'localeFallback' => 'zul', 'charset' => 'utf-8', 'direction' => 'ltr'), 'yid' => array('language' => 'Yiddish', 'locale' => 'yid', 'localeFallback' => 'yid', 'charset' => 'utf-8', 'direction' => 'ltr') ); $this->assertEqual($result, $expected); }
testCatalog method @access public @return void
testCatalog
php
Datawalke/Coordino
cake/tests/cases/libs/l10n.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/l10n.test.php
MIT
function setUp() { $this->Db =& new MagicDb(); }
Sets up a MagicDb class instance for testing @access public
setUp
php
Datawalke/Coordino
cake/tests/cases/libs/magic_db.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/magic_db.test.php
MIT
function testAnalyze() { $r = $this->Db->read(MagicDbTestData::get('magic.db')); $this->assertTrue($r === true); $r = $this->Db->analyze(array()); $this->assertTrue($r === false); $r = $this->Db->analyze(WWW_ROOT.'img'.DS.'cake.icon.gif'); // TODO: Check several serialized file samples for accurate detection }
MagicDb::analyze should properly detect the file type and output additional info as requested. @access public
testAnalyze
php
Datawalke/Coordino
cake/tests/cases/libs/magic_db.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/magic_db.test.php
MIT
function testRead() { $this->Db->db = array(); $r = $this->Db->read(true); $this->assertTrue($r === false); $r = $this->Db->read(5); $this->assertTrue($r === false); $this->Db->db = array('a'); $r = $this->Db->read(array('foo' => 'bar')); $this->assertTrue($r === false); $this->assertTrue($this->Db->db === array('a')); $magicDb = array('header' => array(), 'database' => array()); $r = $this->Db->read($magicDb); $this->assertTrue($r === true); $this->assertTrue($this->Db->db === $magicDb); // @TODO: Test parsing an actual magic.db file $r = $this->Db->read('does-not-exist.db'); $this->assertTrue($r === false); $this->assertTrue($this->Db->db === $magicDb); if (file_exists(VENDORS.'magic.php')) { $r = $this->Db->read(VENDORS.'magic.php'); $this->assertTrue($r === true); $this->assertTrue($this->Db->db === array('header' => array(), 'database' => array())); } $r = $this->Db->read(MagicDbTestData::get('magic.snippet.db')); $this->assertTrue($r === true); }
MagicDb::read should properly read MagicDb databases from .php-/.db-files and plain data arguments passed in and return false if the file wasn't found or if the readed data did not validate. @access public
testRead
php
Datawalke/Coordino
cake/tests/cases/libs/magic_db.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/magic_db.test.php
MIT
function testToArray() { $this->Db->db = array(); $r = $this->Db->toArray(); $this->assertTrue($r === array()); $this->Db->db = array('foo' => 'bar'); $r = $this->Db->toArray(); $this->assertTrue($r === array('foo' => 'bar')); $r = $this->Db->toArray(array('yeah')); $this->assertTrue($r === array('yeah')); $r = $this->Db->toArray("# FILE_ID DB\r\n# Date:2009-10-10\r\n# Source:xxx.php"); $this->assertTrue($r === array()); $r = $this->Db->toArray('foo'); $this->assertTrue($r === array()); $r = $this->Db->toArray(MagicDbTestData::get('magic.snippet.db')); $this->assertTrue($r === MagicDbTestData::get('magic.snippet.db.result')); }
MagicDb::toArray should either return the MagicDb::db property, or the parsed array data if a magic.db dump is passed in as the first argument @access public
testToArray
php
Datawalke/Coordino
cake/tests/cases/libs/magic_db.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/magic_db.test.php
MIT
function testValidates() { $r = $this->Db->validates(array()); $this->assertTrue($r === false); $r = $this->Db->validates(array('header' => true, 'database' => true)); $this->assertTrue($r === false); $magicDb = array('header' => array(), 'database' => array()); $r = $this->Db->validates($magicDb); $this->assertTrue($r === true); $this->Db->db = array(); $r = $this->Db->validates(); $this->assertTrue($r === false); $this->Db->db = $magicDb; $r = $this->Db->validates(); $this->assertTrue($r === true); }
The MagicDb::validates function should return if the array passed to it or the local db property contains a valid MagicDb record set @access public
testValidates
php
Datawalke/Coordino
cake/tests/cases/libs/magic_db.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/magic_db.test.php
MIT
function get($key) { /** * data property * * @var array * @access public */ static $data = array(); if (empty($data)) { $vars = get_class_vars(__CLASS__); foreach ($vars['data'] as $k => $v) { $data[$k] = base64_decode($v); if (preg_match('/^[ais]:[0-9]+/', $data[$k])) { $data[$k] = unserialize($data[$k]); } } } if (!isset($data[$key])) { return false; } return $data[$key]; }
Returns the test data for a given key @param string $key @access public
get
php
Datawalke/Coordino
cake/tests/cases/libs/magic_db.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/magic_db.test.php
MIT
function another_ra_test($id, $other) { return $id + $other; }
another_ra_test method @param mixed $id @param mixed $other @access public @return void
another_ra_test
php
Datawalke/Coordino
cake/tests/cases/libs/object.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/object.test.php
MIT
function post_pass() { return $this->data; }
post pass, testing post passing @return array
post_pass
php
Datawalke/Coordino
cake/tests/cases/libs/object.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/object.test.php
MIT
function params_pass() { return $this->params; }
test param passing and parsing. @return array
params_pass
php
Datawalke/Coordino
cake/tests/cases/libs/object.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/object.test.php
MIT
function index() { return 'This is a test'; }
post pass, testing post passing @return array
index
php
Datawalke/Coordino
cake/tests/cases/libs/object.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/object.test.php
MIT
function emptyMethod() { $this->methodCalls[] = 'emptyMethod'; }
emptyMethod method @access public @return void
emptyMethod
php
Datawalke/Coordino
cake/tests/cases/libs/object.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/object.test.php
MIT
function oneParamMethod($param) { $this->methodCalls[] = array('oneParamMethod' => array($param)); }
oneParamMethod method @param mixed $param @access public @return void
oneParamMethod
php
Datawalke/Coordino
cake/tests/cases/libs/object.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/object.test.php
MIT
function twoParamMethod($param, $param2) { $this->methodCalls[] = array('twoParamMethod' => array($param, $param2)); }
twoParamMethod method @param mixed $param @param mixed $param2 @access public @return void
twoParamMethod
php
Datawalke/Coordino
cake/tests/cases/libs/object.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/object.test.php
MIT
function threeParamMethod($param, $param2, $param3) { $this->methodCalls[] = array('threeParamMethod' => array($param, $param2, $param3)); }
threeParamMethod method @param mixed $param @param mixed $param2 @param mixed $param3 @access public @return void
threeParamMethod
php
Datawalke/Coordino
cake/tests/cases/libs/object.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/object.test.php
MIT
function fourParamMethod($param, $param2, $param3, $param4) { $this->methodCalls[] = array('fourParamMethod' => array($param, $param2, $param3, $param4)); }
fourParamMethod method @param mixed $param @param mixed $param2 @param mixed $param3 @param mixed $param4 @access public @return void
fourParamMethod
php
Datawalke/Coordino
cake/tests/cases/libs/object.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/object.test.php
MIT
function fiveParamMethod($param, $param2, $param3, $param4, $param5) { $this->methodCalls[] = array('fiveParamMethod' => array($param, $param2, $param3, $param4, $param5)); }
fiveParamMethod method @param mixed $param @param mixed $param2 @param mixed $param3 @param mixed $param4 @param mixed $param5 @access public @return void
fiveParamMethod
php
Datawalke/Coordino
cake/tests/cases/libs/object.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/object.test.php
MIT
function crazyMethod($param, $param2, $param3, $param4, $param5, $param6, $param7 = null) { $this->methodCalls[] = array('crazyMethod' => array($param, $param2, $param3, $param4, $param5, $param6, $param7)); }
crazyMethod method @param mixed $param @param mixed $param2 @param mixed $param3 @param mixed $param4 @param mixed $param5 @param mixed $param6 @param mixed $param7 @access public @return void
crazyMethod
php
Datawalke/Coordino
cake/tests/cases/libs/object.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/object.test.php
MIT
function methodWithOptionalParam($param = null) { $this->methodCalls[] = array('methodWithOptionalParam' => array($param)); }
methodWithOptionalParam method @param mixed $param @access public @return void
methodWithOptionalParam
php
Datawalke/Coordino
cake/tests/cases/libs/object.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/object.test.php
MIT
function setUp() { $this->object = new TestObject(); }
setUp method @access public @return void
setUp
php
Datawalke/Coordino
cake/tests/cases/libs/object.test.php
https://github.com/Datawalke/Coordino/blob/master/cake/tests/cases/libs/object.test.php
MIT