Fixed unit-test locales

This commit is contained in:
Rik van der Heijden 2013-06-11 20:03:05 +02:00
parent bbcc7b2335
commit e7d2892e81
9 changed files with 36 additions and 0 deletions

View file

@ -1080,6 +1080,7 @@ class ControllerTest extends CakeTestCase {
* @return void
*/
public function testValidateErrorsOnArbitraryModels() {
Configure::write('Config.language', 'eng');
$TestController = new TestController();
$Post = new ControllerPost();

View file

@ -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'));

View file

@ -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

View file

@ -942,6 +942,7 @@ class TranslateBehaviorTest extends CakeTestCase {
* @return void
*/
public function testValidation() {
Configure::write('Config.language', 'eng');
$this->loadFixtures('Translate', 'TranslatedItem');
$TestModel = new TranslatedItem();

View file

@ -27,6 +27,16 @@ require_once dirname(__FILE__) . DS . 'ModelTestBase.php';
*/
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
*

View file

@ -32,6 +32,16 @@ require_once dirname(__FILE__) . DS . 'ModelTestBase.php';
*/
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.
*

View file

@ -27,6 +27,16 @@ App::uses('CakeValidationSet', 'Model/Validator');
*/
class CakeValidationSetTest extends CakeTestCase {
/**
* override locale to the default (eng).
*
* @return void
*/
public function setUp() {
parent::setUp();
Configure::write('Config.language', 'eng');
}
/**
* testValidate method
*

View file

@ -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();

View file

@ -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);