mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Fixed unit-test locales
This commit is contained in:
parent
bbcc7b2335
commit
e7d2892e81
9 changed files with 36 additions and 0 deletions
|
@ -1080,6 +1080,7 @@ class ControllerTest extends CakeTestCase {
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testValidateErrorsOnArbitraryModels() {
|
public function testValidateErrorsOnArbitraryModels() {
|
||||||
|
Configure::write('Config.language', 'eng');
|
||||||
$TestController = new TestController();
|
$TestController = new TestController();
|
||||||
|
|
||||||
$Post = new ControllerPost();
|
$Post = new ControllerPost();
|
||||||
|
|
|
@ -129,6 +129,7 @@ class ScaffoldTest extends CakeTestCase {
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
Configure::write('Config.language', 'eng');
|
||||||
$request = new CakeRequest(null, false);
|
$request = new CakeRequest(null, false);
|
||||||
$this->Controller = new ScaffoldMockController($request);
|
$this->Controller = new ScaffoldMockController($request);
|
||||||
$this->Controller->response = $this->getMock('CakeResponse', array('_sendHeader'));
|
$this->Controller->response = $this->getMock('CakeResponse', array('_sendHeader'));
|
||||||
|
|
|
@ -148,6 +148,7 @@ class ExceptionRendererTest extends CakeTestCase {
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
Configure::write('Config.language', 'eng');
|
||||||
App::build(array(
|
App::build(array(
|
||||||
'View' => array(
|
'View' => array(
|
||||||
CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS
|
CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS
|
||||||
|
|
|
@ -942,6 +942,7 @@ class TranslateBehaviorTest extends CakeTestCase {
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testValidation() {
|
public function testValidation() {
|
||||||
|
Configure::write('Config.language', 'eng');
|
||||||
$this->loadFixtures('Translate', 'TranslatedItem');
|
$this->loadFixtures('Translate', 'TranslatedItem');
|
||||||
|
|
||||||
$TestModel = new TranslatedItem();
|
$TestModel = new TranslatedItem();
|
||||||
|
|
|
@ -27,6 +27,16 @@ require_once dirname(__FILE__) . DS . 'ModelTestBase.php';
|
||||||
*/
|
*/
|
||||||
class ModelValidationTest extends BaseModelTest {
|
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
|
* Tests validation parameter order in custom validation methods
|
||||||
*
|
*
|
||||||
|
|
|
@ -32,6 +32,16 @@ require_once dirname(__FILE__) . DS . 'ModelTestBase.php';
|
||||||
*/
|
*/
|
||||||
class ModelWriteTest extends BaseModelTest {
|
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.
|
* Test save() failing when there is no data.
|
||||||
*
|
*
|
||||||
|
|
|
@ -27,6 +27,16 @@ App::uses('CakeValidationSet', 'Model/Validator');
|
||||||
*/
|
*/
|
||||||
class CakeValidationSetTest extends CakeTestCase {
|
class CakeValidationSetTest extends CakeTestCase {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* override locale to the default (eng).
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function setUp() {
|
||||||
|
parent::setUp();
|
||||||
|
Configure::write('Config.language', 'eng');
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* testValidate method
|
* testValidate method
|
||||||
*
|
*
|
||||||
|
|
|
@ -524,6 +524,7 @@ class FormHelperTest extends CakeTestCase {
|
||||||
public function setUp() {
|
public function setUp() {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
|
||||||
|
Configure::write('Config.language', 'eng');
|
||||||
Configure::write('App.base', '');
|
Configure::write('App.base', '');
|
||||||
Configure::delete('Asset');
|
Configure::delete('Asset');
|
||||||
$this->Controller = new ContactTestController();
|
$this->Controller = new ContactTestController();
|
||||||
|
|
|
@ -42,6 +42,7 @@ class PaginatorHelperTest extends CakeTestCase {
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
Configure::write('Config.language', 'eng');
|
||||||
$controller = null;
|
$controller = null;
|
||||||
$this->View = new View($controller);
|
$this->View = new View($controller);
|
||||||
$this->Paginator = new PaginatorHelper($this->View);
|
$this->Paginator = new PaginatorHelper($this->View);
|
||||||
|
|
Loading…
Reference in a new issue