Permalink
Browse files

Fixed unit-test locales

  • Loading branch information...
1 parent bbcc7b2 commit e7d2892e8193ee787279122bf0c0ab3cf5157e28 Rik van der Heijden committed Jun 11, 2013
@@ -1080,6 +1080,7 @@ public function testValidateErrors() {
* @return void
*/
public function testValidateErrorsOnArbitraryModels() {
+ Configure::write('Config.language', 'eng');
$TestController = new TestController();
$Post = new ControllerPost();
@@ -129,6 +129,7 @@ class ScaffoldTest extends CakeTestCase {
*/
public function setUp() {
parent::setUp();
+ Configure::write('Config.language', 'eng');
$request = new CakeRequest(null, false);
$this->Controller = new ScaffoldMockController($request);
$this->Controller->response = $this->getMock('CakeResponse', array('_sendHeader'));
@@ -148,6 +148,7 @@ class ExceptionRendererTest extends CakeTestCase {
*/
public function setUp() {
parent::setUp();
+ Configure::write('Config.language', 'eng');
App::build(array(
'View' => array(
CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS
@@ -942,6 +942,7 @@ public function testSaveAllTranslatedAssociations() {
* @return void
*/
public function testValidation() {
+ Configure::write('Config.language', 'eng');
$this->loadFixtures('Translate', 'TranslatedItem');
$TestModel = new TranslatedItem();
@@ -28,6 +28,16 @@
class ModelValidationTest extends BaseModelTest {
/**
+ * override locale to the default (eng).
+ *
+ * @return void
+ */
+ public function setUp() {
+ parent::setUp();
+ Configure::write('Config.language', 'eng');
+ }
+
+/**
* Tests validation parameter order in custom validation methods
*
* @return void
@@ -33,6 +33,16 @@
class ModelWriteTest extends BaseModelTest {
/**
+ * override locale to the default (eng).
+ *
+ * @return void
+ */
+ public function setUp() {
+ parent::setUp();
+ Configure::write('Config.language', 'eng');
+ }
+
+/**
* Test save() failing when there is no data.
*
* @return void
@@ -28,6 +28,16 @@
class CakeValidationSetTest extends CakeTestCase {
/**
+ * override locale to the default (eng).
+ *
+ * @return void
+ */
+ public function setUp() {
+ parent::setUp();
+ Configure::write('Config.language', 'eng');
+ }
+
+/**
* testValidate method
*
* @return void
@@ -524,6 +524,7 @@ class FormHelperTest extends CakeTestCase {
public function setUp() {
parent::setUp();
+ Configure::write('Config.language', 'eng');
Configure::write('App.base', '');
Configure::delete('Asset');
$this->Controller = new ContactTestController();
@@ -42,6 +42,7 @@ class PaginatorHelperTest extends CakeTestCase {
*/
public function setUp() {
parent::setUp();
+ Configure::write('Config.language', 'eng');
$controller = null;
$this->View = new View($controller);
$this->Paginator = new PaginatorHelper($this->View);

0 comments on commit e7d2892

Please sign in to comment.