@@ -19,10 +19,10 @@ discard block |
||
19 | 19 | $ds = DIRECTORY_SEPARATOR; |
20 | 20 | |
21 | 21 | $this->translationSources = array( |
22 | - 'testDomain' => array( __DIR__ . $ds . 'testfiles' . $ds . 'case1' ), |
|
22 | + 'testDomain' => array(__DIR__.$ds.'testfiles'.$ds.'case1'), |
|
23 | 23 | ); |
24 | 24 | |
25 | - $this->object = new \Aimeos\MW\Translation\Gettext( $this->translationSources, 'de_DE' ); |
|
25 | + $this->object = new \Aimeos\MW\Translation\Gettext($this->translationSources, 'de_DE'); |
|
26 | 26 | } |
27 | 27 | |
28 | 28 | |
@@ -34,16 +34,16 @@ discard block |
||
34 | 34 | |
35 | 35 | public function testDt() |
36 | 36 | { |
37 | - $this->assertEquals( 'Datei', $this->object->dt( 'testDomain', 'File' ) ); |
|
37 | + $this->assertEquals('Datei', $this->object->dt('testDomain', 'File')); |
|
38 | 38 | } |
39 | 39 | |
40 | 40 | |
41 | 41 | public function testDtInvalid() |
42 | 42 | { |
43 | - $this->assertEquals( '', $this->object->dt( 'testDomain', null ) ); |
|
43 | + $this->assertEquals('', $this->object->dt('testDomain', null)); |
|
44 | 44 | |
45 | - $this->setExpectedException( '\Aimeos\MW\Translation\Exception' ); |
|
46 | - $this->object->dt( 'invalidTestDomain', 'test' ); |
|
45 | + $this->setExpectedException('\Aimeos\MW\Translation\Exception'); |
|
46 | + $this->object->dt('invalidTestDomain', 'test'); |
|
47 | 47 | } |
48 | 48 | |
49 | 49 | |
@@ -56,26 +56,26 @@ discard block |
||
56 | 56 | * 2, if $n == 5..20, 25..30, 35..40, . |
57 | 57 | */ |
58 | 58 | |
59 | - $object = new \Aimeos\MW\Translation\Gettext( $this->translationSources, 'ru' ); |
|
59 | + $object = new \Aimeos\MW\Translation\Gettext($this->translationSources, 'ru'); |
|
60 | 60 | |
61 | - $this->assertEquals( 'plural 2', $object->dn( 'testDomain', 'File', 'Files', 0 ) ); |
|
62 | - $this->assertEquals( 'singular', $object->dn( 'testDomain', 'File', 'Files', 1 ) ); |
|
63 | - $this->assertEquals( 'plural 1', $object->dn( 'testDomain', 'File', 'Files', 2 ) ); |
|
64 | - $this->assertEquals( 'plural 2', $object->dn( 'testDomain', 'File', 'Files', 5 ) ); |
|
61 | + $this->assertEquals('plural 2', $object->dn('testDomain', 'File', 'Files', 0)); |
|
62 | + $this->assertEquals('singular', $object->dn('testDomain', 'File', 'Files', 1)); |
|
63 | + $this->assertEquals('plural 1', $object->dn('testDomain', 'File', 'Files', 2)); |
|
64 | + $this->assertEquals('plural 2', $object->dn('testDomain', 'File', 'Files', 5)); |
|
65 | 65 | |
66 | - $this->assertEquals( 'plural 1', $object->dn( 'testDomain', 'File', 'Files', 22 ) ); |
|
67 | - $this->assertEquals( 'plural 2', $object->dn( 'testDomain', 'File', 'Files', 25 ) ); |
|
68 | - $this->assertEquals( 'singular', $object->dn( 'testDomain', 'File', 'Files', 31 ) ); |
|
66 | + $this->assertEquals('plural 1', $object->dn('testDomain', 'File', 'Files', 22)); |
|
67 | + $this->assertEquals('plural 2', $object->dn('testDomain', 'File', 'Files', 25)); |
|
68 | + $this->assertEquals('singular', $object->dn('testDomain', 'File', 'Files', 31)); |
|
69 | 69 | } |
70 | 70 | |
71 | 71 | |
72 | 72 | public function testDnInvalid() |
73 | 73 | { |
74 | - $this->assertEquals( '', $this->object->dn( 'testDomain', '', null, 1 ) ); |
|
75 | - $this->assertEquals( '', $this->object->dn( 'testDomain', '', '', null ) ); |
|
74 | + $this->assertEquals('', $this->object->dn('testDomain', '', null, 1)); |
|
75 | + $this->assertEquals('', $this->object->dn('testDomain', '', '', null)); |
|
76 | 76 | |
77 | - $this->setExpectedException( '\Aimeos\MW\Translation\Exception' ); |
|
78 | - $this->object->dn( 'invalidTestDomain', 'test', 'tests', 2 ); |
|
77 | + $this->setExpectedException('\Aimeos\MW\Translation\Exception'); |
|
78 | + $this->object->dn('invalidTestDomain', 'test', 'tests', 2); |
|
79 | 79 | } |
80 | 80 | |
81 | 81 | |
@@ -85,13 +85,13 @@ discard block |
||
85 | 85 | |
86 | 86 | $translationSources = array( |
87 | 87 | 'testDomain' => array( |
88 | - __DIR__ . $ds . 'testfiles' . $ds . 'case1', |
|
89 | - __DIR__ . $ds . 'testfiles' . $ds . 'case2', |
|
88 | + __DIR__.$ds.'testfiles'.$ds.'case1', |
|
89 | + __DIR__.$ds.'testfiles'.$ds.'case2', |
|
90 | 90 | ), |
91 | 91 | ); |
92 | 92 | |
93 | - $object = new \Aimeos\MW\Translation\Gettext( $translationSources, 'de_DE' ); |
|
94 | - $this->assertEquals( 'Neue Version', $object->dt( 'testDomain', 'Update' ) ); |
|
93 | + $object = new \Aimeos\MW\Translation\Gettext($translationSources, 'de_DE'); |
|
94 | + $this->assertEquals('Neue Version', $object->dt('testDomain', 'Update')); |
|
95 | 95 | } |
96 | 96 | |
97 | 97 | |
@@ -101,13 +101,13 @@ discard block |
||
101 | 101 | |
102 | 102 | $translationSources = array( |
103 | 103 | 'testDomain' => array( |
104 | - __DIR__ . $ds . 'testfiles' . $ds . 'case1', |
|
105 | - __DIR__ . $ds . 'testfiles' . $ds . 'case2', |
|
104 | + __DIR__.$ds.'testfiles'.$ds.'case1', |
|
105 | + __DIR__.$ds.'testfiles'.$ds.'case2', |
|
106 | 106 | ), |
107 | 107 | ); |
108 | 108 | |
109 | - $object = new \Aimeos\MW\Translation\Gettext( $translationSources, 'de_DE' ); |
|
110 | - $this->assertEquals( 'KFZs', $object->dn( 'testDomain', 'Car', 'Cars', 25 ) ); |
|
109 | + $object = new \Aimeos\MW\Translation\Gettext($translationSources, 'de_DE'); |
|
110 | + $this->assertEquals('KFZs', $object->dn('testDomain', 'Car', 'Cars', 25)); |
|
111 | 111 | } |
112 | 112 | |
113 | 113 | |
@@ -117,22 +117,22 @@ discard block |
||
117 | 117 | |
118 | 118 | $translationSources = array( |
119 | 119 | 'testDomain' => array( |
120 | - __DIR__ . $ds . 'testfiles' . $ds . 'case1', |
|
121 | - __DIR__ . $ds . 'testfiles' . $ds . 'case2', |
|
120 | + __DIR__.$ds.'testfiles'.$ds.'case1', |
|
121 | + __DIR__.$ds.'testfiles'.$ds.'case2', |
|
122 | 122 | ), |
123 | 123 | ); |
124 | 124 | |
125 | - $object = new \Aimeos\MW\Translation\Gettext( $translationSources, 'de_DE' ); |
|
126 | - $result = $object->getAll( 'testDomain' ); |
|
127 | - |
|
128 | - $this->assertArrayHasKey( 'Car', $result ); |
|
129 | - $this->assertEquals( 'KFZ', $result['Car'][0] ); |
|
130 | - $this->assertEquals( 'KFZs', $result['Car'][1] ); |
|
131 | - $this->assertArrayHasKey( 'File', $result ); |
|
132 | - $this->assertEquals( 'Datei mehr', $result['File'][0] ); |
|
133 | - $this->assertEquals( 'Dateien mehr', $result['File'][1] ); |
|
134 | - $this->assertArrayHasKey( 'Update', $result ); |
|
135 | - $this->assertEquals( 'Neue Version', $result['Update'] ); |
|
125 | + $object = new \Aimeos\MW\Translation\Gettext($translationSources, 'de_DE'); |
|
126 | + $result = $object->getAll('testDomain'); |
|
127 | + |
|
128 | + $this->assertArrayHasKey('Car', $result); |
|
129 | + $this->assertEquals('KFZ', $result['Car'][0]); |
|
130 | + $this->assertEquals('KFZs', $result['Car'][1]); |
|
131 | + $this->assertArrayHasKey('File', $result); |
|
132 | + $this->assertEquals('Datei mehr', $result['File'][0]); |
|
133 | + $this->assertEquals('Dateien mehr', $result['File'][1]); |
|
134 | + $this->assertArrayHasKey('Update', $result); |
|
135 | + $this->assertEquals('Neue Version', $result['Update']); |
|
136 | 136 | } |
137 | 137 | |
138 | 138 | } |