| @@ 159-170 (lines=12) @@ | ||
| 156 | * | |
| 157 | * @dataProvider languageProvider | |
| 158 | */ | |
| 159 | public function testRenderWidgetWithLocaleRequest($symfonyLocale, $ckEditorLocale) | |
| 160 |     { | |
| 161 | $this->request | |
| 162 | ->expects($this->once()) | |
| 163 |             ->method('getLocale') | |
| 164 | ->will($this->returnValue($symfonyLocale)); | |
| 165 | ||
| 166 | $this->assertSame( | |
| 167 |             'CKEDITOR.replace("foo", {"language":"'.$ckEditorLocale.'"});', | |
| 168 |             $this->renderer->renderWidget('foo', []) | |
| 169 | ); | |
| 170 | } | |
| 171 | ||
| 172 | /** | |
| 173 | * @param string $symfonyLocale | |
| @@ 178-185 (lines=8) @@ | ||
| 175 | * | |
| 176 | * @dataProvider languageProvider | |
| 177 | */ | |
| 178 | public function testRenderWidgetWithLocaleParameter($symfonyLocale, $ckEditorLocale) | |
| 179 |     { | |
| 180 |         $this->request->expects($this->once())->method('getLocale')->will($this->returnValue($symfonyLocale)); | |
| 181 | $this->assertSame( | |
| 182 |             'CKEDITOR.replace("foo", {"language":"'.$ckEditorLocale.'"});', | |
| 183 |             $this->renderer->renderWidget('foo', []) | |
| 184 | ); | |
| 185 | } | |
| 186 | ||
| 187 | /** | |
| 188 | * @param string $symfonyLocale | |